Push dev work to master #2

Merged
sixteenmillimeter merged 416 commits from dev into master 2018-07-19 15:29:02 +00:00
1 changed files with 4 additions and 4 deletions
Showing only changes of commit 5496881616 - Show all commits

View File

@ -23,19 +23,19 @@ function parseConfig (str) {
const lines = str.split('\n')
let network = {}
for (let line of lines) {
if (line.indexOf('network={') !== -1) {
if (line.substring(0, 9) === 'network={') {
network = {}
network.raw = line
} else if (line.indexOf('ssid=') !== -1) {
} else if (network.raw && line.indexOf('ssid=') !== -1) {
network.ssid = line.replace('ssid=', '').trim().replace(quoteRe, '')
if (network.raw) {
network.raw += '\n' + line
}
} else if (line.indexOf('}') !== -1) {
} else if (network.raw && line.substring(0, 1) === '}') {
network.raw += '\n' + line
networks.push(network)
network = {}
} else if (network.ssid) {
} else if (network.raw) {
network.raw += '\n' + line
}
}