From 98e0db15a22ced037b6caea4389ccf729e453cdf Mon Sep 17 00:00:00 2001
From: unknown <Alain@Alain-PC.(none)>
Date: Tue, 1 May 2012 17:54:35 +0200
Subject: [PATCH] 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
---
 core/js/js.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/core/js/js.js b/core/js/js.js
index 12303d7dd91..f697f2b8537 100644
--- a/core/js/js.js
+++ b/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));
 		}
 	};
-- 
GitLab