From 64c061610e324bb11a91fc3307f9ecd43351ef36 Mon Sep 17 00:00:00 2001 From: Deepak Kharah <42672761+Deepak-Kharah@users.noreply.github.com> Date: Thu, 11 Jan 2024 10:23:41 +0530 Subject: [PATCH] fix: add windowType in the editor's init. --- src/liveEditor/index.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/liveEditor/index.ts b/src/liveEditor/index.ts index bbc8f369..9ce6ba60 100644 --- a/src/liveEditor/index.ts +++ b/src/liveEditor/index.ts @@ -71,9 +71,10 @@ export class VisualEditor { this.appendVisualEditorDOM(); liveEditorPostMessage - ?.send("init") - .then(() => { - Config.set("windowType", ILivePreviewWindowType.EDITOR); + ?.send<{ windowType: ILivePreviewWindowType }>("init") + .then((data) => { + const { windowType = ILivePreviewWindowType.EDITOR } = data; + Config.set("windowType", windowType); window.addEventListener( "click", this.handleMouseDownForVisualEditing