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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user