diff --git a/plugins/c9.core/settings.js b/plugins/c9.core/settings.js index fdc5389a..8c0882b4 100644 --- a/plugins/c9.core/settings.js +++ b/plugins/c9.core/settings.js @@ -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) {