resolve props: fix json heuristic (missing tab/new-line as valid 1st char)
This commit is contained in:
parent
a62faaa27b
commit
dc3578e9cc
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue