Skip to content

Commit

Permalink
fix: checking is form is open
Browse files Browse the repository at this point in the history
  • Loading branch information
mrCherry97 committed Jul 18, 2024
1 parent 2efefa9 commit 3fc4ecb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/ResourceForm/components/ResourceForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) ||
Expand Down

0 comments on commit 3fc4ecb

Please sign in to comment.