Skip to content

Commit

Permalink
fix: component breaks when images is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
cristinecula committed Dec 11, 2023
1 parent 0fd7f48 commit f671839
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hooks/use-cosmoz-image-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const onImageError = (e) => {
),
{ slide, next, prev, goto, index, first, last } = useSlideList(images, {
loop,
initial: images[host.currentImageIndex],
initial: images?.[host.currentImageIndex],
render: (image) =>
render({
src$: _invoke(image),
Expand Down

0 comments on commit f671839

Please sign in to comment.