From eca08fc6421317d405d0a2e65b250e387f33579c Mon Sep 17 00:00:00 2001 From: Dieter Stinglhamber Date: Fri, 26 Nov 2021 16:37:29 +0100 Subject: [PATCH] small refactor for consistency --- .../core/strapi/lib/services/entity-validator/index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/core/strapi/lib/services/entity-validator/index.js b/packages/core/strapi/lib/services/entity-validator/index.js index 75e6a01574..613b9c0eac 100644 --- a/packages/core/strapi/lib/services/entity-validator/index.js +++ b/packages/core/strapi/lib/services/entity-validator/index.js @@ -149,7 +149,10 @@ const createScalarAttributeValidator = createOrUpdate => ( const createAttributeValidator = createOrUpdate => ( attr, data, - { isDraft, model, attributeName, entity } + { isDraft }, + model, + attributeName, + entity ) => { let validator; @@ -188,7 +191,10 @@ const createModelValidator = createOrUpdate => (model, data, { isDraft }, entity const validator = createAttributeValidator(createOrUpdate)( model.attributes[attributeName], prop(attributeName, data), - { isDraft, model, attributeName, entity } + { isDraft }, + model, + attributeName, + entity ); return assoc(attributeName, validator)(validators);