diff --git a/src/pages/photogallery/[...].js b/src/pages/photogallery/[...].js index 17b74ee..c01deeb 100644 --- a/src/pages/photogallery/[...].js +++ b/src/pages/photogallery/[...].js @@ -17,7 +17,7 @@ const SORT_KEYS = { }; const GalleryPage = ({ data }) => { - const hash = window.location.hash.replace("#", ""); + const hash = typeof window !== "undefined" ? window.location.hash.replace("#", "") : ""; const [filterKeyword, _setKeyword] = React.useState(null); const [sortKey, _setSortKey] = React.useState("rating");