From b67a23665732928391e939aaf2ccb3699c7127a3 Mon Sep 17 00:00:00 2001 From: valhalla-creator Date: Thu, 22 May 2025 21:11:28 +0100 Subject: [PATCH] Update utils.js --- client/lib/utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/lib/utils.js b/client/lib/utils.js index c2cd8886d..1eb25e537 100644 --- a/client/lib/utils.js +++ b/client/lib/utils.js @@ -1,6 +1,7 @@ import { ReactiveCache } from '/imports/reactiveCache'; -Utils = { +// Create Utils as a global object and export it +export const Utils = { setBackgroundImage(url) { const currentBoard = Utils.getCurrentBoard(); if (currentBoard.backgroundImageURL !== undefined) { @@ -591,6 +592,9 @@ Utils = { }, }; +// Make Utils available globally for legacy code +window.Utils = Utils; + // A simple tracker dependency that we invalidate every time the window is // resized. This is used to reactively re-calculate the popup position in case // of a window resize. This is the equivalent of a "Signal" in some other