From 80eb42d7eb591d856dc036deeff21798d7663fca Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Wed, 24 Jul 2024 09:05:02 +0200 Subject: [PATCH] WIP --- library/Icinga/Web/JavaScript.php | 2 +- public/js/icinga.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Web/JavaScript.php b/library/Icinga/Web/JavaScript.php index 1865136c76..71f9342a90 100644 --- a/library/Icinga/Web/JavaScript.php +++ b/library/Icinga/Web/JavaScript.php @@ -238,7 +238,7 @@ public static function optimizeDefine($js, $filePath, $basePath, $packageName) try { $dependencies = $match[2] ? Json::decode($match[2]) : []; foreach ($dependencies as &$dependencyName) { - if ($dependencyName === 'exports') { + if ($dependencyName === 'exports' || $dependencyName === 'Icinga') { // exports is a special keyword and doesn't need optimization continue; } diff --git a/public/js/icinga.js b/public/js/icinga.js index e8b8bccc88..3587c68ebb 100644 --- a/public/js/icinga.js +++ b/public/js/icinga.js @@ -86,6 +86,8 @@ return false; } + define('Icinga', [], () => Icinga); + this.timezone = new Icinga.Timezone(); this.utils = new Icinga.Utils(this); this.logger = new Icinga.Logger(this);