do not return null from settings.getJSON() since that breaks other plugins

pull/43/merge
nightwing 2015-05-21 22:10:29 +00:00
rodzic bdd23d065b
commit a93f7014e6
1 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -428,13 +428,13 @@ define(function(require, exports, module) {
if (typeof json === "object")
return JSON.parse(JSON.stringify(json));
if (typeof json !== "string")
return json;
try {
return JSON.parse(json);
if (typeof json === "string") {
try {
return JSON.parse(json);
} catch (e) {}
}
catch (e) {}
// do not return null or undefined so that getJson(query).foo never throws
return false;
}
function getBool(query) {