diff --git a/lib/graphics.js b/lib/graphics.js index 81ef272..f28ca7c 100644 --- a/lib/graphics.js +++ b/lib/graphics.js @@ -401,7 +401,7 @@ function graphics(callback) { let cmd = 'fbset -s | grep \'mode "\'; vcgencmd get_mem gpu; tvservice -s; tvservice -n;'; exec(cmd, function (error, stdout) { let lines = stdout.toString().split('\n'); - if (lines.length > 3 && lines[0].indexOf('mode "' >= -1) && lines[2].indexOf('0x12000a') > -1) { + if (lines.length > 3 && lines[0].indexOf('mode "') >= -1 && lines[2].indexOf('0x12000a') > -1) { const parts = lines[0].replace('mode', '').replace(/"/g, '').trim().split('x'); if (parts.length === 2) { result.displays.push({ @@ -417,7 +417,7 @@ function graphics(callback) { }) } } - if (lines.length > 1 && lines[1].indexOf('gpu=' >= -1)) { + if (lines.length > 1 && lines[1].indexOf('gpu=') >= -1) { result.controllers.push({ vendor: 'Broadcom', model: 'VideoCore IV', diff --git a/lib/osinfo.js b/lib/osinfo.js index 9f8b995..38b6b6b 100644 --- a/lib/osinfo.js +++ b/lib/osinfo.js @@ -214,7 +214,7 @@ function osInfo(callback) { callback(result); } resolve(result); - }) + }); //} }); } diff --git a/lib/util.js b/lib/util.js index 9063ba2..ab2dfe4 100644 --- a/lib/util.js +++ b/lib/util.js @@ -261,7 +261,7 @@ function getCodepage() { if (!codepage) { try { const stdout = execSync('echo $LANG'); - lines = stdout.toString().split('\r\n'); + const lines = stdout.toString().split('\r\n'); const parts = lines[0].split('.'); codepage = parts.length > 1 ? parts[1].trim() : ''; if (!codepage) {