Do not strip abstract from citation items data in notes
This commit is contained in:
parent
c3a74a22d7
commit
bbb0f8bca4
3 changed files with 2 additions and 7 deletions
|
@ -198,7 +198,6 @@ Zotero.Notes = new function() {
|
|||
/**
|
||||
* Upgrade v1 notes:
|
||||
* - Pull itemData from citations, highlights, images into metadata container
|
||||
* - Strip abstract field from itemData
|
||||
* - For `data-annotation` keep only the following fields:
|
||||
* - uri
|
||||
* - text
|
||||
|
@ -208,7 +207,7 @@ Zotero.Notes = new function() {
|
|||
* - citationItem
|
||||
* - Increase schema version number
|
||||
*
|
||||
* @param item
|
||||
* @param {Zotero.Item} item
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
this.upgradeSchemaV1 = async function (item) {
|
||||
|
@ -240,7 +239,6 @@ Zotero.Notes = new function() {
|
|||
function pullItemData(citationItem) {
|
||||
let { uris, itemData } = citationItem;
|
||||
if (itemData) {
|
||||
delete citationItem.itemData.abstract;
|
||||
delete citationItem.itemData;
|
||||
let item = storedCitationItems.find(item => item.uris.some(uri => uris.includes(uri)));
|
||||
if (!item) {
|
||||
|
|
|
@ -239,7 +239,6 @@ class EditorInstance {
|
|||
|
||||
// TODO: Find a more elegant way to call this
|
||||
let itemData = Zotero.Cite.System.prototype.retrieveItem(parentItem);
|
||||
delete itemData.abstract;
|
||||
if (!skipEmbeddingItemData) {
|
||||
citationItem.itemData = itemData;
|
||||
}
|
||||
|
@ -304,7 +303,6 @@ class EditorInstance {
|
|||
}
|
||||
if (item.isRegularItem()) {
|
||||
let itemData = Zotero.Cite.System.prototype.retrieveItem(item);
|
||||
delete itemData.abstract;
|
||||
let citation = {
|
||||
citationItems: [{
|
||||
uris: [Zotero.URI.getItemURI(item)],
|
||||
|
@ -942,7 +940,6 @@ class EditorInstance {
|
|||
delete citationItem.id;
|
||||
citationItem.uris = [Zotero.URI.getItemURI(item)];
|
||||
citationItem.itemData = Zotero.Cite.System.prototype.retrieveItem(item);
|
||||
delete citationItem.itemData.abstract;
|
||||
}
|
||||
|
||||
let formattedCitation = (await that._getFormattedCitationParts(citation)).join(';');
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit c5dfc982c09915e5a2fb6103edf0395dc17ce728
|
||||
Subproject commit 53d2342f8d7c2dc1cd8b002ef8c76a8360328965
|
Loading…
Reference in a new issue