Browse Source

fix window not defined error

Abhinav 2 years ago
parent
commit
cbdae5b1e8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/utils/common/apiUtil.ts

+ 2 - 2
src/utils/common/apiUtil.ts

@@ -80,9 +80,9 @@ const isDevDeployment = () => {
     if (runningInBrowser()) {
     if (runningInBrowser()) {
         return (
         return (
             process.env.NEXT_PUBLIC_ENTE_WEB_ENDPOINT ===
             process.env.NEXT_PUBLIC_ENTE_WEB_ENDPOINT ===
-                window.location.origin ||
+                globalThis.location.origin ||
             process.env.NEXT_PUBLIC_ENTE_ALBUM_ENDPOINT ===
             process.env.NEXT_PUBLIC_ENTE_ALBUM_ENDPOINT ===
-                window.location.origin ||
+                globalThis.location.origin ||
             process.env.NODE_ENV === 'development'
             process.env.NODE_ENV === 'development'
         );
         );
     }
     }