kopia lustrzana https://github.com/c9/core
do not return null from settings.getJSON() since that breaks other plugins
rodzic
bdd23d065b
commit
a93f7014e6
|
@ -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) {
|
||||
|
|
Ładowanie…
Reference in New Issue