From 691ced6926f3a320bbf18afd740becfd47b50e79 Mon Sep 17 00:00:00 2001 From: "pulse-triage[bot]" <249995291+pulse-triage[bot]@users.noreply.github.com> Date: Sun, 4 Oct 2026 12:05:19 +0100 Subject: [PATCH] Guard phone theme setup before the document root exists Keep all browser error and geometry assertions; theme setup must tolerate the early WebKit init-script phase. The existing post-load dark-context assertion setup remains unchanged. Change-source: pulse-maintainer --- frontend-modern/browser-tests/pbs-capacity.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend-modern/browser-tests/pbs-capacity.cjs b/frontend-modern/browser-tests/pbs-capacity.cjs index 5ba31895d6..68eba42afd 100644 --- a/frontend-modern/browser-tests/pbs-capacity.cjs +++ b/frontend-modern/browser-tests/pbs-capacity.cjs @@ -52,7 +52,7 @@ const runtime = [ hasTouch: phone, colorScheme: phone ? 'dark' : 'light', }); - if (phone) await page.addInitScript(() => document.documentElement.classList.add('dark')); + if (phone) await page.addInitScript(() => document.documentElement?.classList.add('dark')); page.setDefaultTimeout(20000); await page.clock.setFixedTime(new Date('2026-10-04T12:00:00Z')); const errors = [],