From 86c5ce5910bd54dd2cc661c5c01ea9679261e79b Mon Sep 17 00:00:00 2001 From: nightwing Date: Fri, 8 May 2015 14:41:15 +0400 Subject: [PATCH] address review comments --- plugins/c9.core/settings.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/c9.core/settings.js b/plugins/c9.core/settings.js index 117d170a..e996648a 100644 --- a/plugins/c9.core/settings.js +++ b/plugins/c9.core/settings.js @@ -427,14 +427,14 @@ define(function(require, exports, module) { if (typeof json == "object") return JSON.parse(JSON.stringify(json)); - + + if (typeof json == "string") + return json; + try { - var obj = json && JSON.parse(json); - return obj; - } - catch (e) { - return false; + return JSON.parse(json); } + catch (e) {} } function getBool(query) {