diff --git a/desktop/tests/helpers/bootstrap.ts b/desktop/tests/helpers/bootstrap.ts index 0eb8a81578..f2d553706c 100644 --- a/desktop/tests/helpers/bootstrap.ts +++ b/desktop/tests/helpers/bootstrap.ts @@ -37,11 +37,11 @@ export async function bootstrapE2ePage( throw bootstrapFailure(expectedOrigin, page.url(), error); } - if (!response?.ok()) { + if (response && !response.ok()) { throw bootstrapFailure( expectedOrigin, page.url(), - `navigation returned HTTP ${response?.status() ?? "no response"}`, + `navigation returned HTTP ${response.status()}`, ); } diff --git a/web/tests/helpers/bootstrap.ts b/web/tests/helpers/bootstrap.ts index 9b96ae6cc3..ffdd8beafe 100644 --- a/web/tests/helpers/bootstrap.ts +++ b/web/tests/helpers/bootstrap.ts @@ -37,11 +37,11 @@ export async function bootstrapE2ePage( throw bootstrapFailure(expectedOrigin, page.url(), error); } - if (!response?.ok()) { + if (response && !response.ok()) { throw bootstrapFailure( expectedOrigin, page.url(), - `navigation returned HTTP ${response?.status() ?? "no response"}`, + `navigation returned HTTP ${response.status()}`, ); }