From 1062fbdfc10187f99265bb00cb00382c33e10de6 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Sat, 29 Jun 2024 15:05:48 +0200 Subject: mocha: fix failing test due to lack of our globals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Szymon Kłos Change-Id: I22199546c37df4f0e5a17f2008ad824d28bef6ad --- browser/src/canvas/CanvasSectionContainer.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/browser/src/canvas/CanvasSectionContainer.ts b/browser/src/canvas/CanvasSectionContainer.ts index da68616b4f..64c35a4946 100644 --- a/browser/src/canvas/CanvasSectionContainer.ts +++ b/browser/src/canvas/CanvasSectionContainer.ts @@ -251,7 +251,8 @@ class CanvasSectionContainer { this.scrollLineHeight = parseInt(window.getComputedStyle(tempElement).fontSize); document.body.removeChild(tempElement); // Remove the temporary element. - const colorCanvasPropety = (window as any).prefs.getBoolean('darkTheme') ? '--color-canvas-dark' : '--color-canvas-light'; + const colorCanvasPropety = (window as any).prefs ? + ((window as any).prefs.getBoolean('darkTheme') ? '--color-canvas-dark' : '--color-canvas-light') : '--color-canvas-light'; this.clearColor = window.getComputedStyle(document.documentElement).getPropertyValue(colorCanvasPropety); // Set document background color to the app background color for now until we get the real color from the kit -- cgit