Skip to content

Commit f7b9bbe

Browse files
authored
resync if the message change event doesn't match the current state
1 parent ae0295a commit f7b9bbe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/web/js/events.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ function makeEvents(config) {
8787
message.change.to,
8888
thisAPI
8989
);
90+
if(config.CPO.editor.cm.getValue() !== message.currentState.editorContents) {
91+
console.log("Editor contents disagreed with message state, synchronizing.", config.CPO.editor.cm.getValue(), message.currentState.editorContents)
92+
editor.cm.setValue(message.currentState.editorContents);
93+
}
9094
break;
9195
case "run":
9296
interactionsSinceLastRun = [];

0 commit comments

Comments
 (0)