Browse Source

Update dependency array

Shun Miyazawa 2 years ago
parent
commit
f186599b38
1 changed files with 2 additions and 2 deletions
  1. 2 2
      apps/app/src/components/PageEditor/PageEditor.tsx

+ 2 - 2
apps/app/src/components/PageEditor/PageEditor.tsx

@@ -225,7 +225,7 @@ export const PageEditor = React.memo((props: Props): JSX.Element => {
 
 
     mutateEditorMode(EditorMode.View);
     mutateEditorMode(EditorMode.View);
     updateStateAfterSave?.();
     updateStateAfterSave?.();
-  }, [codeMirrorEditor, currentRevisionId, isRevisionIdRequiredForPageUpdate, mutateEditorMode, save, updateStateAfterSave]);
+  }, [codeMirrorEditor, currentRevisionId, isRevisionIdRequiredForPageUpdate, mutateEditorMode, onConflict, save, updateStateAfterSave]);
 
 
   const saveWithShortcut = useCallback(async() => {
   const saveWithShortcut = useCallback(async() => {
     const markdown = codeMirrorEditor?.getDoc();
     const markdown = codeMirrorEditor?.getDoc();
@@ -237,7 +237,7 @@ export const PageEditor = React.memo((props: Props): JSX.Element => {
 
 
     toastSuccess(t('toaster.save_succeeded'));
     toastSuccess(t('toaster.save_succeeded'));
     updateStateAfterSave?.();
     updateStateAfterSave?.();
-  }, [codeMirrorEditor, currentRevisionId, isRevisionIdRequiredForPageUpdate, save, t, updateStateAfterSave]);
+  }, [codeMirrorEditor, currentRevisionId, isRevisionIdRequiredForPageUpdate, onConflict, save, t, updateStateAfterSave]);
 
 
 
 
   // the upload event handler
   // the upload event handler