Skip to content

Commit

Permalink
PWA:3279: useScrollLock doesn't have an option to reset on unmount
Browse files Browse the repository at this point in the history
  • Loading branch information
glo11372 committed Aug 22, 2024
1 parent 44345b1 commit 7dcb582
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/peregrine/lib/hooks/useScrollLock.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const useScrollLock = locked => {
document.documentElement.dataset.scrollLock = locked || '';
return () => {
// Logic to set to false on unmount
document.documentElement.dataset.scrollLock = false;
}
document.documentElement.dataset.scrollLock = false;
};
}, [locked]);
};

0 comments on commit 7dcb582

Please sign in to comment.