diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2024-06-29 15:05:48 +0200 |
---|---|---|
committer | Szymon Kłos <eszkadev@gmail.com> | 2024-06-29 15:26:20 +0200 |
commit | 1062fbdfc10187f99265bb00cb00382c33e10de6 (patch) | |
tree | cdc60d1dc1abe5b28afdc22a3feb523b6c6342cc | |
parent | Invert Calc document color (diff) | |
download | online-1062fbdfc10187f99265bb00cb00382c33e10de6.tar.gz online-1062fbdfc10187f99265bb00cb00382c33e10de6.zip |
mocha: fix failing test due to lack of our globals
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I22199546c37df4f0e5a17f2008ad824d28bef6ad
-rw-r--r-- | browser/src/canvas/CanvasSectionContainer.ts | 3 |
1 files changed, 2 insertions, 1 deletions
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 |