diff --git a/src/components/application-loader/initializers/index.ts b/src/components/application-loader/initializers/index.ts index e4ca979ee..0a5507bc5 100644 --- a/src/components/application-loader/initializers/index.ts +++ b/src/components/application-loader/initializers/index.ts @@ -12,7 +12,11 @@ import { fetchFrontendConfig } from './fetch-frontend-config' import { loadDarkMode } from './load-dark-mode' const customDelay: () => Promise = async () => { - if (window.localStorage.getItem('customDelay')) { + if ( + typeof window !== 'undefined' && + typeof window.localStorage !== 'undefined' && + (window.location.search.startsWith('?customDelay=') || window.localStorage.getItem('customDelay')) + ) { return new Promise((resolve) => setTimeout(resolve, 5000)) } else { return Promise.resolve()