diff --git a/ui/blocks/src/context/block/BlockContext.tsx b/ui/blocks/src/context/block/BlockContext.tsx index 54dd7a46a..6e46d4e99 100644 --- a/ui/blocks/src/context/block/BlockContext.tsx +++ b/ui/blocks/src/context/block/BlockContext.tsx @@ -61,7 +61,8 @@ export const BlockContextProvider: React.FC = ({ const docId = storyId || propsDocId ? propsDocId : store.firstDoc; if (!storyId && docId) { const doc = store.getStoryDoc(docId); - storyId = doc && doc.stories.length ? doc.stories[0] : undefined; + storyId = + doc && doc.stories && doc.stories.length ? doc.stories[0] : undefined; } return (