plot: prevent json parse attempt to throw
This commit is contained in:
parent
bc52b2f662
commit
40e4a3ff6d
1 changed files with 4 additions and 2 deletions
|
|
@ -174,8 +174,10 @@ module.exports = class _plots_base extends Canvas {
|
|||
|
||||
setValue(v, options={}) {
|
||||
|
||||
if (typeof v == 'string' && (v[0] == '[' || v[0] == '{' )) {
|
||||
v = JSON.parseFlex(v)
|
||||
if (typeof v == 'string') {
|
||||
try {
|
||||
v = JSON.parseFlex(v)
|
||||
} catch(err) {}
|
||||
}
|
||||
|
||||
if (typeof v == 'object') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue