From b000d2c60c3ccbfeb97d556af827d43aa710b9c9 Mon Sep 17 00:00:00 2001 From: Baba Kamyljanov Date: Wed, 11 Dec 2024 13:36:44 +0800 Subject: [PATCH] fixed window location issue --- src/components/withLocation/withURLLocation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/withLocation/withURLLocation.js b/src/components/withLocation/withURLLocation.js index 2a781edb..65ca216c 100644 --- a/src/components/withLocation/withURLLocation.js +++ b/src/components/withLocation/withURLLocation.js @@ -3,7 +3,7 @@ import { Location } from '@reach/router'; import queryString from 'query-string'; let search = - typeof location !== 'undefined' && location.search + typeof window !== 'undefined' && window.location.search ? queryString.parse(window.location.search) : {};