From 57db4140a0838d56af3a3c35b8c48633594b52dc Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Fri, 20 Oct 2023 19:42:59 +0100 Subject: [PATCH] Use default value when page label is empty Fixes zotero/zotero#3409 --- src/common/components/common/preview.js | 28 +++++++++++-------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/common/components/common/preview.js b/src/common/components/common/preview.js index b23624dd..57a560be 100644 --- a/src/common/components/common/preview.js +++ b/src/common/components/common/preview.js @@ -65,12 +65,10 @@ export function PopupPreview(props) { || annotation.type === 'text' && } - {annotation.pageLabel && ( -
-
-
{annotation.pageLabel}
-
- )} +
+
+
{annotation.pageLabel || '-'}
+
{annotation.authorName && ( @@ -273,16 +271,14 @@ export function SidebarPreview(props) { || annotation.type === 'text' && }
- {annotation.pageLabel && ( -
-
-
{annotation.pageLabel}
-
- )} +
+
+
{annotation.pageLabel || '-'}
+
{annotation.authorName && (