Skip to content

Commit

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

const currentValue = useSyncExternalStore(
listen,
() => {
// TODO this check should be useless after React 18
if (typeof window === 'undefined') {
return null;
}
return storageSlot.get();
},
() => storageSlot.get(),
() => null,
);

Expand Down

0 comments on commit b1260a6

Please sign in to comment.