Fix marking of childItems as loaded for non-top-level items
Now that attachments and notes can have child items too
This commit is contained in:
parent
ea04c32c9d
commit
b1e324ddfb
2 changed files with 20 additions and 3 deletions
|
@ -624,4 +624,16 @@ describe("Zotero.Items", function () {
|
|||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("#_loadChildItems()", function () {
|
||||
it("should mark child items as loaded for an attachment", async function () {
|
||||
var attachment = await importPDFAttachment();
|
||||
var itemID = attachment.id;
|
||||
Zotero.Items.unload([itemID]);
|
||||
attachment = await Zotero.Items.getAsync(itemID);
|
||||
await attachment.loadDataType('childItems');
|
||||
assert.isTrue(attachment._loaded.childItems);
|
||||
attachment.getAnnotations();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue