diff --git a/samples/appcache-tiles.html b/samples/appcache-tiles.html index 9310a58..c5c6521 100644 --- a/samples/appcache-tiles.html +++ b/samples/appcache-tiles.html @@ -194,11 +194,11 @@ console.log("LIBRARY STATUS IS: " + Offline.state); if(Offline.state === 'up'){ // updateOfflineUsage(); imgOfflineIndicator.src = bluePinPath; - baseMapLayer.goOnline(); + if(typeof baseMapLayer != "undefined") baseMapLayer.goOnline(); } else{ imgOfflineIndicator.src = redPinPath; - baseMapLayer.goOffline(); + if(typeof baseMapLayer != "undefined") baseMapLayer.goOffline(); } }