-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: breaking app when window not available on startup
- Loading branch information
1 parent
965090d
commit 5d75b0d
Showing
3 changed files
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
export const BaseUrl = window.location.origin + "/admin"; | ||
export const DomainUrl = window.location.origin; | ||
export const BaseUrl = () => { | ||
if (typeof window === "undefined") return ""; | ||
|
||
return window.location.origin + "/admin"; | ||
}; | ||
export const DomainUrl = () => { | ||
if (typeof window === "undefined") return ""; | ||
|
||
return window.location.origin; | ||
}; |