Windows Bugfix

This commit is contained in:
Christian Kuster 2016-04-07 14:38:42 +02:00
parent 253b375923
commit 7cf077d527

View File

@ -18,9 +18,13 @@ function parseOutput(str, callback) {
var wifis = []; var wifis = [];
var err = null; var err = null;
try { try {
if (blocks.length < 2) {
// 2nd try, with \r\n
blocks = str.split('\r\n\r\n')
}
if (!blocks || blocks.length === 1) { if (!blocks || blocks.length === 1) {
// No WiFis found // No WiFis found
return []; return callback(null, []);
} }
// Each block has the same structure, while some parts might be available and others // Each block has the same structure, while some parts might be available and others