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.
This commit is contained in:
Tom Najdek 2020-09-09 11:41:48 +02:00 committed by Dan Stillman
parent 02e4bdfdb0
commit eff19923ef

View file

@ -1824,6 +1824,8 @@
var elem;
var [field, creatorIndex, creatorField] = fieldName.split('-');
var newVal;
creatorIndex = parseInt(creatorIndex);
// Creator fields
if (field == 'creator') {