Fix missing itemData when creating a note from annotations

This commit is contained in:
Martynas Bagdonas 2021-04-21 16:55:44 +03:00
parent 3de7b6c5ec
commit 1eb888d026

View file

@ -271,7 +271,11 @@ class EditorInstance {
citationItems: [citationItem],
properties: {}
};
let formatted = this._formatCitation(citation);
let citationWithData = JSON.parse(JSON.stringify(citation));
citationWithData.citationItems[0].itemData = itemData;
let formatted = this._formatCitation(citationWithData);
citationHTML = `<span class="citation" data-citation="${encodeURIComponent(JSON.stringify(citation))}">(${formatted})</span>`;
}