Skip to content

Commit

Permalink
there is a situation in tests where window is defined but window.loca…
Browse files Browse the repository at this point in the history
…tion is undefined
  • Loading branch information
paulfitz committed May 13, 2024
1 parent 90e9d19 commit d564d1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/common/BaseAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class BaseAPI {
// This is a fallback mechanism if auth is broken to access the
// admin panel.
// TODO: should this be more selective?
if (typeof window !== 'undefined') {
if (typeof window !== 'undefined' && window.location) {
const url = new URL(window.location.href);
const bootKey = url.searchParams.get('boot');
if (bootKey) {
Expand Down

0 comments on commit d564d1d

Please sign in to comment.