We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c17cde7 + 5aac13d commit 311b2bcCopy full SHA for 311b2bc
source/utils/config.js
@@ -1,5 +1,9 @@
1
+function isClient() {
2
+ return typeof window !== 'undefined';
3
+}
4
+
5
function isFandomCom() {
- if (window && window.location && window.location.hostname) {
6
+ if (isClient() && window.location && window.location.hostname) {
7
return window.location.hostname.includes('fandom.com');
8
}
9
@@ -13,6 +17,7 @@ const IS_PRODUCTION_APP = process.env.env === 'production';
13
17
const SERVICES_BASE_URL = isFandomCom() ? 'https://services.fandom.com/' : 'https://services.fandom-dev.us/';
14
18
15
19
const config = {
20
+ isClient,
16
21
isFandomCom,
22
IS_PRODUCTION_APP,
23
SERVICES_BASE_URL,
0 commit comments