Limit list to 20 wifi APs, not 5.
This commit is contained in:
parent
52ace62fc6
commit
3a4c076d82
|
@ -33,13 +33,14 @@ class Wifi {
|
|||
console.error(err)
|
||||
return callback(err)
|
||||
}
|
||||
const limit = 20;
|
||||
const lines = stdout.split('\n')
|
||||
let output = []
|
||||
let line
|
||||
let i = 0
|
||||
for (let l of lines) {
|
||||
line = l.replace('ESSID:', '').trim()
|
||||
if (line !== '""' && i < 5) {
|
||||
if (line !== '""' && i < limit) {
|
||||
line = line.replace(quoteRe, '')
|
||||
output.push(line)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue