Skip to content

Commit ad921cb

Browse files
fix warning when closing window with unsaved files
1 parent 3656aab commit ad921cb

File tree

1 file changed

+3
-1
lines changed
  • packages/app/src/app/pages/Sandbox/Editor/Content

1 file changed

+3
-1
lines changed

packages/app/src/app/pages/Sandbox/Editor/Content/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,15 @@ export const Content: React.FC = () => {
4848

4949
preventGestureScroll(contentEl.current);
5050

51+
actions.editor.contentMounted();
52+
5153
return () => {
5254
window.removeEventListener('resize', updateEditorSize);
5355
// clearInterval(this.interval);
5456
disposeResizeDetector();
5557
removeListener(contentNode);
5658
};
57-
}, [effects.vscode, reaction, updateEditorSize]);
59+
}, [actions.editor, effects.vscode, reaction, updateEditorSize]);
5860

5961
const { currentModule } = state.editor;
6062
const notSynced = !state.editor.isAllModulesSynced;

0 commit comments

Comments
 (0)