From aa1c076973b420ebb1a758a1918095ddfc791edb Mon Sep 17 00:00:00 2001 From: Cristian Necula Date: Mon, 11 Dec 2023 20:48:22 +0200 Subject: [PATCH] fix: component breaks when images is undefined --- lib/hooks/use-cosmoz-image-viewer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/hooks/use-cosmoz-image-viewer.js b/lib/hooks/use-cosmoz-image-viewer.js index eb787ef..3173b15 100644 --- a/lib/hooks/use-cosmoz-image-viewer.js +++ b/lib/hooks/use-cosmoz-image-viewer.js @@ -58,9 +58,10 @@ const onImageError = (e) => { ${renderImage(opts)} `, + empty = [], useCosmozImageViewer = (host) => { const { - images, + images = empty, showZoom, title, downloadFileName = 'archive',