From 5e98ffed285b0d1ae508193192b9a5ee90e7f7fe Mon Sep 17 00:00:00 2001 From: Ahmed Mostafa Date: Mon, 18 Nov 2024 09:04:42 +0200 Subject: [PATCH] Fix: cloudimage query loading with flip was causing issue due to undefined crop param --- .../src/utils/cloudimageQueryToDesignState.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/react-filerobot-image-editor/src/utils/cloudimageQueryToDesignState.js b/packages/react-filerobot-image-editor/src/utils/cloudimageQueryToDesignState.js index 66aede57..00b84677 100644 --- a/packages/react-filerobot-image-editor/src/utils/cloudimageQueryToDesignState.js +++ b/packages/react-filerobot-image-editor/src/utils/cloudimageQueryToDesignState.js @@ -190,8 +190,13 @@ const cloudimageQueryToDesignState = ( designState = deepMerge(designState, operationDesignStateObject, true); } }); - const { cropX2, cropY2, crop, watermark, ...unPreparedDesignState } = - designState; + const { + cropX2, + cropY2, + crop = {}, + watermark, + ...unPreparedDesignState + } = designState; if (designState.adjustments?.isFlippedX) { crop.x = shownImageDimensions.width - (cropX2 || 0);