Skip to content

Commit

Permalink
fix: didn't remove fields at index 0
Browse files Browse the repository at this point in the history
  • Loading branch information
SamBauwensPM committed Jul 3, 2024
1 parent cba5fd0 commit 1d09465
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ angular.module('platformWebApp')
metaFieldIndex = _.findIndex(metaFields, metaFieldToFind);
}

if (metaFieldIndex <= 0) {
if (metaFieldIndex < 0) {
throw new Error(metaFieldDescription
? `The metaForm '${metaFormName}' doesn't contain a field with ${metaFieldDescription}, the field could not be removed.`
: `The metaForm '${metaFormName}' doesn't contain the field to be removed.`);
Expand Down

0 comments on commit 1d09465

Please sign in to comment.