mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
there is a situation in tests where window is defined but window.location is undefined
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user