File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/code-editor/src/CodeEditor Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -166,30 +166,30 @@ export const CodeEditor = forwardRef<CodeEditorHandle, CodeEditorProps>(
166
166
* @returns boolean indicating if undo was successful
167
167
*/
168
168
const handleUndo = useCallback ( ( ) : boolean => {
169
- const commands = modules ?. [ '@codemirror/commands' ] ;
169
+ const commands = coreModules ?. [ '@codemirror/commands' ] ;
170
170
171
171
if ( ! editorViewRef . current || ! commands ) {
172
172
console . warn ( 'Undo is not available - editor or commands not loaded' ) ;
173
173
return false ;
174
174
}
175
175
176
176
return commands . undo ( editorViewRef . current ) ;
177
- } , [ modules ] ) ;
177
+ } , [ coreModules ] ) ;
178
178
179
179
/**
180
180
* Redoes the last undone editor action if possible.
181
181
* @returns boolean indicating if redo was successful
182
182
*/
183
183
const handleRedo = useCallback ( ( ) : boolean => {
184
- const commands = modules ?. [ '@codemirror/commands' ] ;
184
+ const commands = coreModules ?. [ '@codemirror/commands' ] ;
185
185
186
186
if ( ! editorViewRef . current || ! commands ) {
187
187
console . warn ( 'Redo is not available - editor or commands not loaded' ) ;
188
188
return false ;
189
189
}
190
190
191
191
return commands . redo ( editorViewRef . current ) ;
192
- } , [ modules ] ) ;
192
+ } , [ coreModules ] ) ;
193
193
194
194
useLayoutEffect ( ( ) => {
195
195
const EditorView = coreModules ?. [ '@codemirror/view' ] ;
You can’t perform that action at this time.
0 commit comments