From bbb0f8bca4418d6ed03a768edd1f8c28b87859a6 Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Mon, 5 Apr 2021 08:55:35 +0300 Subject: [PATCH] Do not strip abstract from citation items data in notes --- chrome/content/zotero/xpcom/data/notes.js | 4 +--- chrome/content/zotero/xpcom/editorInstance.js | 3 --- note-editor | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/notes.js b/chrome/content/zotero/xpcom/data/notes.js index 890a8f4aae..5bfb1925d1 100644 --- a/chrome/content/zotero/xpcom/data/notes.js +++ b/chrome/content/zotero/xpcom/data/notes.js @@ -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} */ 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) { diff --git a/chrome/content/zotero/xpcom/editorInstance.js b/chrome/content/zotero/xpcom/editorInstance.js index e2b89f41e1..8aee3483ec 100644 --- a/chrome/content/zotero/xpcom/editorInstance.js +++ b/chrome/content/zotero/xpcom/editorInstance.js @@ -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(';'); diff --git a/note-editor b/note-editor index c5dfc982c0..53d2342f8d 160000 --- a/note-editor +++ b/note-editor @@ -1 +1 @@ -Subproject commit c5dfc982c09915e5a2fb6103edf0395dc17ce728 +Subproject commit 53d2342f8d7c2dc1cd8b002ef8c76a8360328965