Remove no-op line in ReaderInstance::_getAnnotation()

And clarify variable name for item vs. JSON
This commit is contained in:
Dan Stillman 2020-12-26 02:34:28 -05:00
parent 6ee3863e37
commit 9254bcbd03

View file

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