Skip to content

Commit 1df68ec

Browse files
authored
Merge pull request #18 from felipedeboni/fix/docs-view
fix: Cannot read properties of undefined (reading 'worker') on docs view
2 parents c26b1f9 + 62971e8 commit 1df68ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mswLoader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const mswLoader = async (context: Context) => {
5757
return;
5858
}
5959

60-
if (viewMode === "docs" && window.__MSW_STORYBOOK__.worker) {
60+
if (viewMode === "docs" && window.__MSW_STORYBOOK__ && window.__MSW_STORYBOOK__.worker) {
6161
worker =
6262
!isNodeProcess() && window.__MSW_STORYBOOK__.worker;
6363
} else {

0 commit comments

Comments
 (0)