Skip to content

Commit 02a849e

Browse files
[getsentry/action-github-commit] Auto commit
1 parent 19b1e92 commit 02a849e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/components/imageLightbox/index.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ type ValidDimensions = {
3030
width: number;
3131
};
3232

33-
const getValidDimensions = (
34-
width?: number,
35-
height?: number
36-
): ValidDimensions | null => {
33+
const getValidDimensions = (width?: number, height?: number): ValidDimensions | null => {
3734
if (
3835
width != null &&
3936
height != null &&
@@ -62,7 +59,9 @@ export function ImageLightbox({
6259
// Check if we should use Next.js Image or regular img
6360
// Use Next.js Image for internal images with valid dimensions
6461
// Use regular img for external images or when dimensions are invalid/missing
65-
const validDimensions = !isExternalImage(src) ? getValidDimensions(width, height) : null;
62+
const validDimensions = !isExternalImage(src)
63+
? getValidDimensions(width, height)
64+
: null;
6665

6766
const handleClick = (e: React.MouseEvent) => {
6867
// If Ctrl/Cmd+click, open image in new tab

0 commit comments

Comments
 (0)