add cant detect network if failure

pull/1/head
yann300 7 years ago
parent 9252ec5644
commit f45bd03495
  1. 8
      src/app/tabs/run-tab.js

@ -383,8 +383,12 @@ function settings (appAPI, appEvents) {
var net = yo`<span class=${css.network}></span>`
const updateNetwork = () => {
executionContext.detectNetwork((err, { id, name } = {}) => {
if (err) console.error(err)
net.innerHTML = `<i class="${css.networkItem} fa fa-plug" aria-hidden="true"></i> ${name} (${id || '-'})`
if (err) {
console.error(err)
net.innerHTML = 'can\'t detect network '
} else {
net.innerHTML = `<i class="${css.networkItem} fa fa-plug" aria-hidden="true"></i> ${name} (${id || '-'})`
}
})
}
setInterval(updateNetwork, 5000)

Loading…
Cancel
Save