mirror of
https://github.com/zotero/zotero.git
synced 2026-09-20 00:12:49 +00:00
Load creators if needed to update display title in Items._loadItemData()
This commit is contained in:
parent
a714f06670
commit
44fd598699
1 changed files with 15 additions and 1 deletions
|
|
@ -315,7 +315,21 @@ Zotero.Items = function() {
|
|||
item._clearChanged('itemData');
|
||||
|
||||
// Display titles
|
||||
item.updateDisplayTitle()
|
||||
try {
|
||||
item.updateDisplayTitle()
|
||||
}
|
||||
catch (e) {
|
||||
// A few item types need creators to be loaded. Instead of making
|
||||
// updateDisplayTitle() async and loading conditionally, just catch the error
|
||||
// and load on demand
|
||||
if (e instanceof Zotero.Exception.UnloadedDataException) {
|
||||
yield item.loadDataType('creators');
|
||||
item.updateDisplayTitle()
|
||||
}
|
||||
else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue