Skip to content

Commit 00e413e

Browse files
authored
Components: refactor Modal to pass exhaustive-deps (#41610)
* Modal: add `bodyOpenClassName` to `useEffect` deps * Modal: update changelog
1 parent 6f3bb8c commit 00e413e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/components/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
- Enhance the TypeScript migration guidelines ([#41669](https://github.com/WordPress/gutenberg/pull/41669)).
2828
- `ExternalLink`: Convert to TypeScript ([#41681](https://github.com/WordPress/gutenberg/pull/41681)).
2929
- `InputControl` updated to satisfy `react/exhuastive-deps` eslint rule ([#41601](https://github.com/WordPress/gutenberg/pull/41601))
30+
- `Modal`: updated to satisfy `react/exhuastive-deps` eslint rule ([#41610](https://github.com/WordPress/gutenberg/pull/41610))
31+
3032

3133
### Experimental
3234

packages/components/src/modal/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function Modal( props, forwardedRef ) {
8989
ariaHelper.showApp();
9090
}
9191
};
92-
}, [] );
92+
}, [ bodyOpenClassName ] );
9393

9494
function handleEscapeKeyDown( event ) {
9595
if (

0 commit comments

Comments
 (0)