Commit 2e601f8db932ad3a585614456e8c6ebd9a34b5ae
1 parent
30b2d328a5
Exists in
master
More debug on modem chooser
Showing 1 changed file with 9 additions and 2 deletions Side-by-side Diff
lib/modem-chooser.js
... | ... | @@ -14,8 +14,15 @@ function filterOutCandidates(candidates) { |
14 | 14 | if (!candidates.length) return []; |
15 | 15 | |
16 | 16 | const filtered = candidates.filter((item) => { |
17 | - if (typeof item !== 'string') return false; | |
18 | - if (item.indexOf('#') >= 0) return false; | |
17 | + if (typeof item !== 'string') { | |
18 | + if (logger) logger.warn(`MODEM-CHOOSER: typeof item is ${ typeof item }, not a string`); | |
19 | + return false; | |
20 | + } | |
21 | + | |
22 | + if (item.indexOf('#') >= 0) { | |
23 | + if (logger) logger.warn('MODEM-CHOOSER: candidate has #, ignoring'); | |
24 | + return false; | |
25 | + } | |
19 | 26 | |
20 | 27 | const modem = modems.get('imsi', item); |
21 | 28 | if (!modem) { |