From 2e24ff8d1322556d9c47c5a70a105f18f470a692 Mon Sep 17 00:00:00 2001 From: SamBauwensPM Date: Wed, 3 Jul 2024 16:41:59 +0200 Subject: [PATCH] fix: Cannot remove meta field at index 0 (#2815) --- .../wwwroot/js/common/directives/metaform.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VirtoCommerce.Platform.Web/wwwroot/js/common/directives/metaform.js b/src/VirtoCommerce.Platform.Web/wwwroot/js/common/directives/metaform.js index 2c7392e943..2dc44c75ac 100644 --- a/src/VirtoCommerce.Platform.Web/wwwroot/js/common/directives/metaform.js +++ b/src/VirtoCommerce.Platform.Web/wwwroot/js/common/directives/metaform.js @@ -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.`);