From 67505f396029b256906119c778fe44b9062ff79e Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 6 Nov 2024 13:53:41 -0500 Subject: [PATCH] Don't show '0000' on invalid date in reader title Same logic used for attachment renaming and the item tree Year column. Fixes #4817 --- chrome/content/zotero/xpcom/reader.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chrome/content/zotero/xpcom/reader.js b/chrome/content/zotero/xpcom/reader.js index 8ddddc8ced..24071a3215 100644 --- a/chrome/content/zotero/xpcom/reader.js +++ b/chrome/content/zotero/xpcom/reader.js @@ -599,6 +599,9 @@ class ReaderInstance { let unformatted = Zotero.isWin; let creator = parentItem.getField('firstCreator', unformatted); let year = parentItem.getField('year'); + if (year == '0000') { + year = ''; + } // Only include parent title if primary attachment let title = isPrimaryAttachment ? parentItem.getDisplayTitle() : false; // If creator is missing fall back to titleCreatorYear