From bde0b60259ccb2267c859a60e9750071432dbe7e Mon Sep 17 00:00:00 2001 From: wolfgang Date: Thu, 1 Nov 2007 15:27:03 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1212 d1b88da0-ebda-0310-925b-ed51d893ca5b --- UI/WebServerResources/generic.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js index 5498edf5..044347e6 100644 --- a/UI/WebServerResources/generic.js +++ b/UI/WebServerResources/generic.js @@ -1317,14 +1317,22 @@ function loadPreferences() { var http = createHTTPClient(); http.open("GET", url, false); http.send(""); - if (http.status == 200) - userDefaults = http.responseText.evalJSON(true); + if (http.status == 200) { + if (http.responseText.length > 0) + userDefaults = http.responseText.evalJSON(true); + else + userDefaults = {}; + } url = UserFolderURL + "jsonSettings"; http.open("GET", url, false); http.send(""); - if (http.status == 200) - userSettings = http.responseText.evalJSON(true); + if (http.status == 200) { + if (http.responseText.length > 0) + userSettings = http.responseText.evalJSON(true); + else + userSettings = {}; + } } function onLoadHandler(event) { -- 2.39.5