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
remotes/origin/stable4
unknown 13 years ago committed by Robin Appelman
parent e48f511606
commit 98e0db15a2
  1. 1
      core/js/js.js

@ -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));
}
};

Loading…
Cancel
Save