We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8098741 commit 750edc7Copy full SHA for 750edc7
packages/docusaurus-theme-common/src/utils/storageUtils.ts
@@ -229,8 +229,8 @@ export function useStorageSlot(
229
const currentValue = useSyncExternalStore(
230
listen,
231
() => {
232
- // TODO this check should be useless after React 18
233
- if (typeof window === 'undefined') {
+ // react-test-renderer (deprecated) never call getServerSnapshot() :/
+ if (process.env.NODE_ENV === 'test') {
234
return null;
235
}
236
return storageSlot.get();
0 commit comments