Skip to content

Commit 500cd3c

Browse files
authored
fix: don't fire new content into ReactAce if values are already reconciled (#1744)
1 parent cd836c1 commit 500cd3c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/plugins/editor/components/editor.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ export default function makeEditor({ editorPluginsToRun }) {
162162
}
163163

164164
updateYaml = () => {
165+
if(this.editor.getValue() === this.yaml[0]) {
166+
// editor is already aware of latest changes, so do nothing
167+
return
168+
}
169+
165170
// this.silent is taken from react-ace module. It avoids firing onChange, when we update setValue
166171
this.silent = true
167172
const pos = this.editor.session.selection.toJSON()

0 commit comments

Comments
 (0)