Remove no-op line in ReaderInstance::_getAnnotation()
And clarify variable name for item vs. JSON
This commit is contained in:
parent
6ee3863e37
commit
9254bcbd03
1 changed files with 7 additions and 8 deletions
|
@ -446,15 +446,14 @@ class ReaderInstance {
|
|||
}
|
||||
// TODO: Remve when fixed
|
||||
item._loaded.childItems = true;
|
||||
item = await Zotero.Annotations.toJSON(item);
|
||||
item.id = item.key;
|
||||
item.image = item.image;
|
||||
delete item.key;
|
||||
for (let key in item) {
|
||||
item[key] = item[key] || '';
|
||||
let json = await Zotero.Annotations.toJSON(item);
|
||||
json.id = item.key;
|
||||
delete json.key;
|
||||
for (let key in json) {
|
||||
json[key] = json[key] || '';
|
||||
}
|
||||
item.tags = item.tags || [];
|
||||
return item;
|
||||
json.tags = json.tags || [];
|
||||
return json;
|
||||
}
|
||||
catch (e) {
|
||||
Zotero.logError(e);
|
||||
|
|
Loading…
Reference in a new issue