mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Null check image visual_files (#6136)
This commit is contained in:
@@ -67,8 +67,8 @@ export const GalleryViewer: React.FC<IProps> = ({ galleryId }) => {
|
||||
images.forEach((image, index) => {
|
||||
let imageData = {
|
||||
src: image.paths.thumbnail!,
|
||||
width: image.visual_files[0].width,
|
||||
height: image.visual_files[0].height,
|
||||
width: image.visual_files[0]?.width ?? 0,
|
||||
height: image.visual_files[0]?.height ?? 0,
|
||||
tabIndex: index,
|
||||
key: image.id ?? index,
|
||||
loading: "lazy",
|
||||
|
||||
@@ -72,8 +72,8 @@ const ImageWall: React.FC<IImageWallProps> = ({
|
||||
image.paths.preview != ""
|
||||
? image.paths.preview!
|
||||
: image.paths.thumbnail!,
|
||||
width: image.visual_files[0].width,
|
||||
height: image.visual_files[0].height,
|
||||
width: image.visual_files?.[0]?.width ?? 0,
|
||||
height: image.visual_files?.[0]?.height ?? 0,
|
||||
tabIndex: index,
|
||||
key: image.id,
|
||||
loading: "lazy",
|
||||
|
||||
Reference in New Issue
Block a user