From c3aba631b1f83a08b961d2b51b972378a64a9769 Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Thu, 5 Jun 2014 17:25:43 -0600 Subject: [PATCH] added checks for undefined object --- samples/appcache-tiles.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); } }