Skip to content

Commit 94891b9

Browse files
committed
fix: return the data when mode is builder
1 parent f88723c commit 94891b9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/livePreview/eventManager/postMessageEvent.hooks.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ export function sendInitializeLivePreviewPostMessageEvent(): void {
7777
windowType = ILivePreviewWindowType.PREVIEW,
7878
} = data || {};
7979

80+
// TODO: This is a fix for the issue where we were calling sending init in the builder
81+
// Let's remove this condition when we fix it.
82+
if (Config?.get()?.windowType && Config.get().windowType === ILivePreviewWindowType.BUILDER) {
83+
return;
84+
}
85+
8086
if (contentTypeUid && entryUid) {
8187
// TODO: we should not use this function. Instead we should have sideEffect run automatically when we set the config.
8288
setConfigFromParams({

0 commit comments

Comments
 (0)