Skip to content

Commit 7f525f1

Browse files
authored
Merge pull request #35 from RichuJohn/hotfix/input-event-trigger
changing lastParsedData property to hold an entirely new object, whic…
2 parents 81fe9b7 + de5a37e commit 7f525f1

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

package-lock.json

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
},
4545
"dependencies": {
4646
"highlight.js": "^9.15.6",
47+
"lodash.clonedeep": "^4.5.0",
4748
"vue": "^2.6.8",
4849
"vuedraggable": "^2.23.2"
4950
},

src/JsonEditor.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
<script>
88
import JsonView from "./JsonView.vue";
9+
import cloneDeep from "lodash.clonedeep";
910
1011
export default {
1112
name: "JsonEditor",
@@ -50,7 +51,7 @@ export default {
5051
return;
5152
}
5253
53-
this.lastParsedData = newValue;
54+
this.lastParsedData = cloneDeep(newValue);
5455
this.$emit("input", this.makeJson(this.parsedData));
5556
},
5657
deep: true

0 commit comments

Comments
 (0)