Skip to content

Commit 7b78185

Browse files
authored
Merge pull request #552 from storybookjs/kasper/fix-next-error
Exclude new server component error
2 parents 2d485ce + 91cf68d commit 7b78185

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/setup-page-script.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ async function __getContext(storyId: string): Promise<any> {
284284
function isServerComponentError(error: unknown) {
285285
return (
286286
typeof error === 'string' &&
287-
(error.includes('A component was suspended by an uncached promise.') ||
287+
(error.includes('Only Server Components can be async at the moment.') ||
288+
error.includes('A component was suspended by an uncached promise.') ||
288289
error.includes('async/await is not yet supported in Client Components'))
289290
);
290291
}

0 commit comments

Comments
 (0)