From eff19923ef3020290e1d0520d159ac127487be49 Mon Sep 17 00:00:00 2001 From: Tom Najdek Date: Wed, 9 Sep 2020 11:41:48 +0200 Subject: [PATCH] Parse creatorIndex string value as a number #1874 Sending value as a string to "removeCreator" breaks the logic in the loop in that method which is supposed to remove target creator and shift remaining creators in the array. This in turn triggers undesired removal of the last creator in the array. --- chrome/content/zotero/bindings/itembox.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml index 40b66fd0b5..b1f961e3ca 100644 --- a/chrome/content/zotero/bindings/itembox.xml +++ b/chrome/content/zotero/bindings/itembox.xml @@ -1824,6 +1824,8 @@ var elem; var [field, creatorIndex, creatorField] = fieldName.split('-'); var newVal; + + creatorIndex = parseInt(creatorIndex); // Creator fields if (field == 'creator') {