Skip to content

Commit 5d94b1c

Browse files
committed
Fikser feilaktig nullish coalescing i NextImage
1 parent cea8189 commit 5d94b1c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/nextjs/playwright/screenshot.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ for (const story of stories) {
2828
}
2929
);
3030
} catch (error) {
31-
return;
31+
throw new Error(`Failed to take screenshot for ${story.title} ${story.name}: ${error}`);
3232
}
3333
});
3434
}

packages/nextjs/src/components/_common/image/NextImage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const buildImageCacheUrl = ({
4141
maxWidth,
4242
quality,
4343
}: { src: string; isEditorView: boolean } & NextImageProps) => {
44-
if (isEditorView ?? !isValidImageUrl(src)) {
44+
if (isEditorView || !isValidImageUrl(src)) {
4545
return src;
4646
}
4747

0 commit comments

Comments
 (0)