diff options
author | Struan Donald <struan@exo.org.uk> | 2012-11-28 10:52:12 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-11-28 10:52:12 +0000 |
commit | 8120d2e9c9035c69511379e8b94bf69ff8378cb6 (patch) | |
tree | 596df16aa1ee9f068b98e2cf963961e880f940af /www/js | |
parent | 267faa4ee1c6bf4cf5343a4e94474186f20c2aba (diff) |
avoid horrible failure if navigator objects not defined
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/mobile.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/www/js/mobile.js b/www/js/mobile.js index ce1a23e..75f66ca 100644 --- a/www/js/mobile.js +++ b/www/js/mobile.js @@ -715,8 +715,8 @@ function decide_front_page() { localStorage.offline = 0; delete localStorage.currentReport; - if ( navigator.network.connection.type == Connection.NONE || - navigator.network.connection.type == Connection.UNKNOWN ) { + if ( navigator && navigator.network && ( navigator.network.connection.type == Connection.NONE || + navigator.network.connection.type == Connection.UNKNOWN ) ) { localStorage.offline = 1; $.mobile.changePage( 'no_connection.html' ); } else { |