Skip to content

Commit

Permalink
fix: Cannot remove meta field at index 0 (#2815)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamBauwensPM committed Jul 3, 2024
1 parent b86597d commit 2e24ff8
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 2e24ff8

Please sign in to comment.