From 76909db51f6aa8619043b3ca2bb63b241596f0d2 Mon Sep 17 00:00:00 2001 From: Timofey Boyko Date: Thu, 13 Jun 2024 17:44:24 +0300 Subject: [PATCH] Fixed Bug 68353 - The document does not reload after its assembly when the network connection is interrupted --- packages/doceditor/src/components/Editor.tsx | 2 ++ packages/doceditor/src/utils/events.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/doceditor/src/components/Editor.tsx b/packages/doceditor/src/components/Editor.tsx index cd472fa736..a7e4bc705b 100644 --- a/packages/doceditor/src/components/Editor.tsx +++ b/packages/doceditor/src/components/Editor.tsx @@ -47,6 +47,7 @@ import { onSDKWarning, onSDKError, onSDKRequestRename, + onOutdatedVersion, } from "@/utils/events"; import useInit from "@/hooks/useInit"; import useEditorEvents from "@/hooks/useEditorEvents"; @@ -231,6 +232,7 @@ const Editor = ({ onDocumentStateChange, onMetaChange, onMakeActionLink, + onOutdatedVersion, }; if (successAuth) { diff --git a/packages/doceditor/src/utils/events.ts b/packages/doceditor/src/utils/events.ts index dca5894092..5ec6d17acb 100644 --- a/packages/doceditor/src/utils/events.ts +++ b/packages/doceditor/src/utils/events.ts @@ -119,3 +119,5 @@ export const onSDKRequestRename = async ( const title = (event as TRenameEvent).data; await updateFile(id, title); }; + +export const onOutdatedVersion = () => window.location.reload();