Skip to content

Commit

Permalink
fix(preview): ineditor check
Browse files Browse the repository at this point in the history
  • Loading branch information
BJvdA committed May 6, 2021
1 parent 161e70e commit 9d109c3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/bridge/withStory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ export const withStory = <T extends WithStoryProps = WithStoryProps>(
if (
(props as any)?.__storyblok_toolkit_preview &&
typeof window !== 'undefined' &&
window.storyblok &&
!window.storyblok.isInEditor()
(!window.storyblok || !window.storyblok.isInEditor())
) {
setPreview(true);
}
Expand Down

1 comment on commit 9d109c3

@vercel
Copy link

@vercel vercel bot commented on 9d109c3 May 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.