Skip to content

Commit 3400247

Browse files
committed
fix: prod build break
1 parent 148530c commit 3400247

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/editor/Editor.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,14 +1375,14 @@ define(function (require, exports, module) {
13751375
&& history.done[history.done.length -1];
13761376
while(lastHistoryItem && lastHistoryItem.restorePointName !== restorePointName) {
13771377
newHistory = self.getHistory();
1378-
historyLength = newHistory?.done?.length;
1378+
historyLength = newHistory.done.length;
13791379
cm.undoSelection();
13801380
newHistory = self.getHistory();
1381-
if(historyLength === newHistory?.done?.length) {
1381+
if(historyLength === newHistory.done.length) {
13821382
// undo selection didnt do anything, try undo
13831383
cm.undo();
13841384
newHistory = self.getHistory();
1385-
if(historyLength === newHistory?.done?.length) {
1385+
if(historyLength === newHistory.done.length) {
13861386
// we cant undo, and this will go into an infinite loop if we continue.
13871387
console.error("Could not undo history to restore snapshot!");
13881388
break;

0 commit comments

Comments
 (0)