From: wolfgang Date: Thu, 1 Nov 2007 15:27:03 +0000 (+0000) Subject: git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1212 d1b88da0-ebda-0310... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bde0b60259ccb2267c859a60e9750071432dbe7e;p=scalable-opengroupware.org git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1212 d1b88da0-ebda-0310-925b-ed51d893ca5b --- 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) {