Fix "Filename" tab title option
https://forums.zotero.org/discussion/comment/441259/#Comment_441259
This commit is contained in:
parent
b05ef8ed04
commit
3eef4284d1
1 changed files with 7 additions and 2 deletions
|
@ -544,8 +544,13 @@ class ReaderInstance {
|
||||||
let item = Zotero.Items.get(this._item.id);
|
let item = Zotero.Items.get(this._item.id);
|
||||||
let readerTitle = item.getDisplayTitle();
|
let readerTitle = item.getDisplayTitle();
|
||||||
let parentItem = item.parentItem;
|
let parentItem = item.parentItem;
|
||||||
// If type is "filename", then readerTitle already has it
|
if (type === 'filename') {
|
||||||
if (parentItem && type !== 'filename') {
|
let attachment = await parentItem.getBestAttachment();
|
||||||
|
if (attachment && attachment.id === this._item.id) {
|
||||||
|
readerTitle = attachment.attachmentFilename;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (parentItem) {
|
||||||
let attachment = await parentItem.getBestAttachment();
|
let attachment = await parentItem.getBestAttachment();
|
||||||
if (attachment && attachment.id === this._item.id) {
|
if (attachment && attachment.id === this._item.id) {
|
||||||
let parts = [];
|
let parts = [];
|
||||||
|
|
Loading…
Add table
Reference in a new issue