Don't show '0000' on invalid date in reader title

Same logic used for attachment renaming and the item tree Year column.

Fixes #4817
This commit is contained in:
Abe Jellinek 2024-11-06 13:53:41 -05:00
parent bd8cae6fdd
commit 67505f3960

View file

@ -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