Skip to content

Commit ef3c89e

Browse files
committed
Do not show invalid pointers after commiting a change in an array or object field
1 parent 9bc832d commit ef3c89e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dashboard/Data/Browser/Editor.react.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import FileEditor from 'components/FileEditor/FileEditor.react';
1212
import GeoPointEditor from 'components/GeoPointEditor/GeoPointEditor.react';
1313
import NumberEditor from 'components/NumberEditor/NumberEditor.react';
1414
import Parse from 'parse';
15+
import decode from 'parse/lib/browser/decode';
1516
import React from 'react';
1617
import StringEditor from 'components/StringEditor/StringEditor.react';
1718

@@ -30,7 +31,7 @@ let Editor = ({ top, left, type, targetClass, value, readonly, width, onCommit }
3031
} else if (type === 'Array' || type === 'Object') {
3132
let encodeCommit = (json) => {
3233
try {
33-
let obj = JSON.parse(json);
34+
let obj = decode(JSON.parse(json));
3435
onCommit(obj);
3536
} catch (e) {
3637
onCommit(value);

0 commit comments

Comments
 (0)