mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
there is a situation in tests where window is defined but window.location is undefined
This commit is contained in:
parent
8645128b89
commit
19f40085fa
@ -66,7 +66,7 @@ export class BaseAPI {
|
|||||||
// This is a fallback mechanism if auth is broken to access the
|
// This is a fallback mechanism if auth is broken to access the
|
||||||
// admin panel.
|
// admin panel.
|
||||||
// TODO: should this be more selective?
|
// TODO: should this be more selective?
|
||||||
if (typeof window !== 'undefined') {
|
if (typeof window !== 'undefined' && window.location) {
|
||||||
const url = new URL(window.location.href);
|
const url = new URL(window.location.href);
|
||||||
const bootKey = url.searchParams.get('boot');
|
const bootKey = url.searchParams.get('boot');
|
||||||
if (bootKey) {
|
if (bootKey) {
|
||||||
|
Loading…
Reference in New Issue
Block a user