aboutsummaryrefslogtreecommitdiffstats
path: root/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js')
-rw-r--r--www/js/mobile.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/www/js/mobile.js b/www/js/mobile.js
index a9a59a7..c536fcb 100644
--- a/www/js/mobile.js
+++ b/www/js/mobile.js
@@ -5,7 +5,14 @@ Storage.prototype.setObject = function(key, value) {
};
Storage.prototype.getObject = function(key) {
- return JSON.parse(this.getItem(key));
+ var item = this.getItem(key);
+ // if we try to parse an empty thing on Android then
+ // it falls over :(
+ if ( item ) {
+ return JSON.parse(item);
+ } else {
+ return null;
+ }
};
function touchmove(e) {