From 7a77bfbe78b73e258e1af8455cd1053d6f0ee286 Mon Sep 17 00:00:00 2001 From: Chuck Dries Date: Tue, 21 Jun 2022 12:09:06 -0700 Subject: [PATCH] fix debug check --- src/pages/photogallery.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/photogallery.js b/src/pages/photogallery.js index edeb99c..9cff4a5 100644 --- a/src/pages/photogallery.js +++ b/src/pages/photogallery.js @@ -13,7 +13,9 @@ const GalleryPage = ({ data }) => { () => R.pipe( R.map((edge) => edge.node), - debug ? R.sortBy(R.path(["fields", "imageMeta", "dominantHue", 0])) : R.identity + debug + ? R.sortBy(R.path(["fields", "imageMeta", "dominantHue", 0])) + : R.identity )(data.allFile.edges), [data, debug] ); @@ -50,7 +52,8 @@ const GalleryPage = ({ data }) => {

Photo Gallery

- {window && window.location.hash.includes("debug") ? ( + {typeof window !== "undefined" && + window.location.hash.includes("debug") ? (