diff --git a/web_src/js/utils/testhelper.ts b/web_src/js/utils/testhelper.ts index e91cf85e864bc..ed3c1e51e0b4d 100644 --- a/web_src/js/utils/testhelper.ts +++ b/web_src/js/utils/testhelper.ts @@ -2,5 +2,5 @@ // even if backend is in testing mode, frontend could be complied in production mode // so this function only checks if the frontend is in unit testing mode (usually from *.test.ts files) export function isInFrontendUnitTest() { - return process.env.TEST === 'true'; + return process && process.env.TEST === 'true'; }