Fix duplicate attachment row from attachments-box notify()
(#4250)
This commit is contained in:
parent
fad3e25278
commit
310e741a01
2 changed files with 11 additions and 24 deletions
|
@ -597,6 +597,9 @@ describe("Item pane", function () {
|
|||
assert.equal(preview.previewType, "pdf");
|
||||
// 2 rows
|
||||
assert.equal(attachmentsBox.querySelectorAll("attachment-row").length, 2);
|
||||
// Simulate an extra 'add' event on the attachment - still 2 rows
|
||||
attachmentsBox.notify('add', 'item', [attachment2.id]);
|
||||
assert.equal(attachmentsBox.querySelectorAll("attachment-row").length, 2);
|
||||
|
||||
// Created annotations should be update in preview and attachment row
|
||||
let annotation = await createAnnotation('highlight', attachment2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue