Skip to content

Commit 2485128

Browse files
authored
Fix usages of uSES with missing getServerSnapshot (#60943)
* Fix usages of uSES with missing getServerSnapshot * Fill PR number in changelog
1 parent f2a92c1 commit 2485128

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

packages/components/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Bug Fix
6+
7+
- `SlotFill`: fixed missing `getServerSnapshot` parameter in slot map ([#60943](https://github.com/WordPress/gutenberg/pull/60943)).
8+
59
## 27.4.0 (2024-04-19)
610

711
### Deprecation

packages/components/src/slot-fill/bubbles-virtually/observable-map.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,5 @@ export function useObservableValue< K, V >(
7575
],
7676
[ map, name ]
7777
);
78-
return useSyncExternalStore( subscribe, getValue );
78+
return useSyncExternalStore( subscribe, getValue, getValue );
7979
}

packages/plugins/src/components/plugin-area/index.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ function PluginArea( {
113113
};
114114
}, [ scope ] );
115115

116-
const plugins = useSyncExternalStore( store.subscribe, store.getValue );
116+
const plugins = useSyncExternalStore(
117+
store.subscribe,
118+
store.getValue,
119+
store.getValue
120+
);
117121

118122
return (
119123
<div style={ { display: 'none' } }>

0 commit comments

Comments
 (0)