From 2d96a41c4290aa3c990b6d5ecd0531ff1ed4b6f4 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Fri, 19 Oct 2018 09:07:30 +0200 Subject: [PATCH] resolve props: fix json heuristic (missing tab/new-line as valid 1st char) --- src/browser/js/app/widgets/common/widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/js/app/widgets/common/widget.js b/src/browser/js/app/widgets/common/widget.js index b7040e17..b6a46c82 100644 --- a/src/browser/js/app/widgets/common/widget.js +++ b/src/browser/js/app/widgets/common/widget.js @@ -493,7 +493,7 @@ class Widget extends EventEmitter { // if the string doesn't starts with one of these chars // it's going to fail // ref in source: https://github.com/douglascrockford/JSON-js - if (' +-eE{([0123456789tfn"'.indexOf(propValue[0]) !== -1) { + if (' \n+-eE{([0123456789tfn"'.indexOf(propValue[0]) !== -1) { try { propValue = JSON.parse(propValue) } catch (err) {}