Skip to content

Commit

Permalink
revert + update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Nov 29, 2024
1 parent b1260a6 commit 9983f1f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/docusaurus-theme-common/src/utils/storageUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,13 @@ export function useStorageSlot(

const currentValue = useSyncExternalStore(
listen,
() => storageSlot.get(),
() => {
// react-test-renderer (deprecated) never call getServerSnapshot() :/
if (process.env.NODE_ENV === 'test') {
return null;
}
return storageSlot.get();
},
() => null,
);

Expand Down

0 comments on commit 9983f1f

Please sign in to comment.