fix scroll bug?
This commit is contained in:
parent
6d68510745
commit
f21fc5efd1
@ -109,8 +109,8 @@ const GalleryPage = ({
|
|||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
// hacky but it works for now
|
// hacky but it works for now
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
// don't scroll into view if user got here with back button
|
// don't scroll into view if user got here with back button or if we just cleared it
|
||||||
if (!hash) {
|
if (!hash || !hash.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const el = document.getElementById(hash);
|
const el = document.getElementById(hash);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user