Assigning the global Gerrit js object just once as window.Gerrit

The JS compiler for the Polymer 2 build has complained about
redeclaration of Gerrit, so apparently it understands that Gerrit and
window.Gerrit are the same thing.

Change-Id: Ic19549d63393954087d22ce72012661a7668cb83
This commit is contained in:
Ben Rohlfs
2019-06-05 12:22:19 +02:00
parent bf5b328748
commit 233b4f46ee
6 changed files with 7 additions and 22 deletions

View File

@@ -477,7 +477,8 @@
flushPreinstalls();
const Gerrit = window.Gerrit || {};
window.Gerrit = window.Gerrit || {};
const Gerrit = window.Gerrit;
let _resolveAllPluginsLoaded = null;
let _allPluginsPromise = null;
@@ -689,8 +690,6 @@
}
};
window.Gerrit = Gerrit;
// Preloaded plugins should be installed after Gerrit.install() is set,
// since plugin preloader substitutes Gerrit.install() temporarily.
installPreloadedPlugins();