From 887d63675950c7bdfbe36d08214967a01247670d Mon Sep 17 00:00:00 2001 From: Hiroshi Urabe Date: Sun, 24 Sep 2023 18:20:11 +0900 Subject: [PATCH 1/2] pass Component instance to unregisterSlot. --- packages/components/src/slot-fill/slot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/src/slot-fill/slot.js b/packages/components/src/slot-fill/slot.js index a960647c3ab64e..f03192de95263f 100644 --- a/packages/components/src/slot-fill/slot.js +++ b/packages/components/src/slot-fill/slot.js @@ -47,7 +47,7 @@ class SlotComponent extends Component { const { name, unregisterSlot, registerSlot } = this.props; if ( prevProps.name !== name ) { - unregisterSlot( prevProps.name ); + unregisterSlot( prevProps.name, this ); registerSlot( name, this ); } } From 26e51ab819d99cb4cf7c91f272944cc0acaa9adf Mon Sep 17 00:00:00 2001 From: Hiroshi Urabe Date: Sun, 24 Sep 2023 18:30:52 +0900 Subject: [PATCH 2/2] update changelog --- packages/components/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index dbcdd8ca475572..b9b18a20c80496 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -11,6 +11,7 @@ - `Placeholder`: Improved DOM structure and screen reader announcements ([#45801](https://github.com/WordPress/gutenberg/pull/45801)). - `DateTimePicker`: fix onChange callback check so that it also works inside iframes ([#54669](https://github.com/WordPress/gutenberg/pull/54669)). - `FormTokenField`: Add `box-sizing` reset style and reset default padding ([#54734](https://github.com/WordPress/gutenberg/pull/54734)). +- `SlotFill`: Pass `Component` instance to unregisterSlot ([#54765](https://github.com/WordPress/gutenberg/pull/54765)). ### Internal