Skip to content

Commit 696773d

Browse files
committed
fix: ts types
1 parent 321f418 commit 696773d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/mdjs-core/src/mdjsStoryParse.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ export function mdjsStoryParse({
186186
visit(tree, 'code', nodeCodeVisitor);
187187
// we can only return/modify the tree but stories should not be part of the tree
188188
// so we attach it globally to the file.data
189+
if (!file.data) {
190+
file.data = {};
191+
}
189192
file.data.stories = stories;
190193

191194
return tree;

0 commit comments

Comments
 (0)