correction of bug oc-393 in using owncloud V2, V3, V4 with android browser :

JSON.parse(null) results in 'Uncaught illegal access' and not 'null' (see google for details)

solved

Signed-off-by: bourgeoa
This commit is contained in:
unknown 2012-05-01 17:54:35 +02:00 committed by Robin Appelman
parent e48f511606
commit 98e0db15a2
1 changed files with 1 additions and 0 deletions

View File

@ -171,6 +171,7 @@ if(typeof localStorage !='undefined'){
return localStorage.setItem(OC.localStorage.namespace+name,JSON.stringify(item));
},
getItem:function(name){
if(localStorage.getItem(OC.localStorage.namespace+name)==null){return null;}
return JSON.parse(localStorage.getItem(OC.localStorage.namespace+name));
}
};