From 351b0801a7356550ebfde5e2ee5b6b89851cdbf9 Mon Sep 17 00:00:00 2001 From: nd0ut Date: Wed, 8 Feb 2023 18:28:02 +0400 Subject: [PATCH] fix(cloud-image-editor): fix extraction of `filter` operation with undefined value --- blocks/CloudImageEditor/src/lib/transformationUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks/CloudImageEditor/src/lib/transformationUtils.js b/blocks/CloudImageEditor/src/lib/transformationUtils.js index 862498ea1..03774c85a 100644 --- a/blocks/CloudImageEditor/src/lib/transformationUtils.js +++ b/blocks/CloudImageEditor/src/lib/transformationUtils.js @@ -86,7 +86,7 @@ const asNumber = ([value]) => (typeof value !== 'undefined' ? Number(value) : un const asBoolean = () => true; const asFilter = ([name, amount]) => ({ name, - amount: Number(amount), + amount: typeof amount !== 'undefined' ? Number(amount) : 100, }); // Docs: https://uploadcare.com/docs/transformations/image/resize-crop/#operation-crop