From 9d49c7c5792b816e32031fcc5bf36cddb60b70bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Ostafin?= Date: Mon, 28 Feb 2022 12:07:50 +0100 Subject: [PATCH] IBX-2422: Cannot Select from library in ImageAsset field (#342) --- .../universal-discovery/content.meta.preview.module.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bundle/ui-dev/src/modules/universal-discovery/content.meta.preview.module.js b/src/bundle/ui-dev/src/modules/universal-discovery/content.meta.preview.module.js index f2b7b0d5ea..00605c97ca 100644 --- a/src/bundle/ui-dev/src/modules/universal-discovery/content.meta.preview.module.js +++ b/src/bundle/ui-dev/src/modules/universal-discovery/content.meta.preview.module.js @@ -36,13 +36,13 @@ const ContentMetaPreview = () => { window.ibexa.helpers.tooltips.parse(refContentMetaPreview.current); }); - if (!markedLocationId || markedLocationId === 1) { + if (!markedLocationId || markedLocationId === 1 || !locationData) { return null; } const { bookmarked, location, version, permissions } = locationData; const bookmarkIconName = bookmarked ? 'bookmark-active' : 'bookmark'; - const isLocationDataLoaded = !!(locationData && locationData.location && locationData.version); + const isLocationDataLoaded = !!(location && version); const toggleBookmarked = () => { const toggleBookmark = bookmarked ? removeBookmark : addBookmark;