mirror of
https://github.com/stashapp/stash.git
synced 2026-01-05 23:25:04 +01:00
Null check image visual_files (#6136)
This commit is contained in:
parent
6d76fe690b
commit
2e8bc3536f
2 changed files with 4 additions and 4 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue