Skip to content
Snippets Groups Projects
Commit 98e0db15 authored by unknown's avatar unknown Committed by Robin Appelman
Browse files

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
parent e48f5116
No related branches found
No related tags found
No related merge requests found
...@@ -171,6 +171,7 @@ if(typeof localStorage !='undefined'){ ...@@ -171,6 +171,7 @@ if(typeof localStorage !='undefined'){
return localStorage.setItem(OC.localStorage.namespace+name,JSON.stringify(item)); return localStorage.setItem(OC.localStorage.namespace+name,JSON.stringify(item));
}, },
getItem:function(name){ getItem:function(name){
if(localStorage.getItem(OC.localStorage.namespace+name)==null){return null;}
return JSON.parse(localStorage.getItem(OC.localStorage.namespace+name)); return JSON.parse(localStorage.getItem(OC.localStorage.namespace+name));
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment