From f356c875a18888a5ec2d78f62fa7adef98dfcaee Mon Sep 17 00:00:00 2001 From: jos Date: Wed, 18 Mar 2020 16:47:41 +0100 Subject: [PATCH] Fix #932: `JSONEditor.update` broken, did not always recognize when the input changed --- HISTORY.md | 6 ++++++ src/js/Node.js | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index dcf2c76..402669c 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,6 +2,12 @@ https://github.com/josdejong/jsoneditor +## not yet published, version 8.6.3 + +- Fix #932: `JSONEditor.update` broken, did not always recognize when the + input changed. Regression introduced in `v8.6.2`. + + ## 2020-03-18, version 8.6.2 - Fixed #917, #926: Keep order of properties when updating an object. diff --git a/src/js/Node.js b/src/js/Node.js index 6ac27c8..e0278e6 100644 --- a/src/js/Node.js +++ b/src/js/Node.js @@ -1496,7 +1496,8 @@ export class Node { return false } for (i = 0; i < props.length; i++) { - if (this.childs[i].field !== props[i]) { + const child = this.childs[i] + if (child.field !== props[i] || !child.deepEqual(json[child.field])) { return false } }