From feb23d53a20f9b7986339d636ba323d90c15e442 Mon Sep 17 00:00:00 2001 From: Bart Kalisz Date: Thu, 21 Sep 2023 10:48:07 +0200 Subject: [PATCH] Assert non-null instead of casting --- packages/e2e-test-utils-playwright/src/metrics/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/e2e-test-utils-playwright/src/metrics/index.ts b/packages/e2e-test-utils-playwright/src/metrics/index.ts index a00748d02bd8d6..a2ce9830a199f3 100644 --- a/packages/e2e-test-utils-playwright/src/metrics/index.ts +++ b/packages/e2e-test-utils-playwright/src/metrics/index.ts @@ -161,11 +161,11 @@ export class Metrics { const firstPaintStartTime = paintTimings.find( ( { name } ) => name === 'first-paint' - )?.startTime as number; + )!.startTime; const firstContentfulPaintStartTime = paintTimings.find( ( { name } ) => name === 'first-contentful-paint' - )?.startTime as number; + )!.startTime; return { // Server side metric.