We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b76a20b commit ccf3478Copy full SHA for ccf3478
1 file changed
packages/super-editor/src/components/toolbar/super-toolbar.js
@@ -804,8 +804,8 @@ export class SuperToolbar extends EventEmitter {
804
805
if (this.activeEditor.options.ydoc) {
806
const undoManager = yUndoPluginKey.getState(this.activeEditor.state)?.undoManager;
807
- this.undoDepth = undoManager?.undoStack.length;
808
- this.redoDepth = undoManager?.redoStack.length;
+ this.undoDepth = undoManager?.undoStack.length || 0;
+ this.redoDepth = undoManager?.redoStack.length || 0;
809
} else {
810
this.undoDepth = undoDepth(this.activeEditor.state);
811
this.redoDepth = redoDepth(this.activeEditor.state);
0 commit comments