From 3fc4ecbf50fbe608f0691958ecaf6ec7a1cd4fa9 Mon Sep 17 00:00:00 2001 From: mrCherry97 Date: Thu, 18 Jul 2024 13:47:19 +0200 Subject: [PATCH] fix: checking is form is open --- src/shared/ResourceForm/components/ResourceForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/ResourceForm/components/ResourceForm.js b/src/shared/ResourceForm/components/ResourceForm.js index e457029d10..6801bbc233 100644 --- a/src/shared/ResourceForm/components/ResourceForm.js +++ b/src/shared/ResourceForm/components/ResourceForm.js @@ -95,7 +95,7 @@ export function ResourceForm({ useEffect(() => { // Check if form is opened based on width - if (leavingForm && formElementRef.current?.clientWidth > 0) { + if (leavingForm && formElementRef?.current?.clientWidth !== 0) { if ( JSON.stringify(excludeStatus(resource)) !== JSON.stringify(excludeStatus(initialResource)) ||