From ef141ea8594e2ef2db041c7ac13b72d560f03314 Mon Sep 17 00:00:00 2001 From: peteruithoven Date: Wed, 17 Jun 2015 10:31:19 +0200 Subject: [PATCH] Prevent an update/status call to a undefined url --- js/BoxPage.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/BoxPage.js b/js/BoxPage.js index a2b2644..26bcd6f 100644 --- a/js/BoxPage.js +++ b/js/BoxPage.js @@ -53,14 +53,15 @@ //console.log(" _boxData: ",_boxData); _title.text(_boxData.wifiboxid); - setNetworkStatus(NetworkAPI.STATUS.CONNECTED); var drawLink = (_boxData.link)? _boxData.link : boxURL; _page.find("#drawItem a").attr("href",drawLink); _networkAPI.init(boxURL); - retrieveNetworkStatus(); _updateAPI.init(boxURL); + + setNetworkStatus(NetworkAPI.STATUS.CONNECTED); + retrieveNetworkStatus(); }); $.mobile.document.on( "pagebeforehide", PAGE_ID, function( event, data ) { clearTimeout(_retryRetrieveStatusDelay);