diff --git a/src/bridge/withStory.tsx b/src/bridge/withStory.tsx index 3d83f48..6d14282 100644 --- a/src/bridge/withStory.tsx +++ b/src/bridge/withStory.tsx @@ -24,8 +24,7 @@ export const withStory = ( if ( (props as any)?.__storyblok_toolkit_preview && typeof window !== 'undefined' && - window.storyblok && - !window.storyblok.isInEditor() + (!window.storyblok || !window.storyblok.isInEditor()) ) { setPreview(true); }