From f499693465b0900be9ebc4aa550312bb5302cd59 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Fri, 19 Aug 2016 16:02:11 +0200 Subject: [PATCH] better handling when device is connected to wifi-box acces point --- src/doodle3dmanager.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/doodle3dmanager.js b/src/doodle3dmanager.js index 46d0615..871d7f9 100644 --- a/src/doodle3dmanager.js +++ b/src/doodle3dmanager.js @@ -18,7 +18,7 @@ export default class Doodle3DManager extends EventDispatcher { wifiboxid: 'Node JS Server', localip: '127.0.0.1:3000' }*/]; - this.checkNonServerBoxes = false; + this.checkNonServerBoxes = true; this.autoUpdate = false; } @@ -39,12 +39,11 @@ export default class Doodle3DManager extends EventDispatcher { } } async _checkNew() { - let boxes; + let boxes = []; try { boxes = await rest.get(`${ this.api }list.php`); } catch(error) { console.warn('fail connecting to Doodle3D server'); - return; } if (this.checkNonServerBoxes) boxes = boxes.concat(this.nonServerBoxes);