Files
gerrit/polygerrit-ui/app/embed/embed.html
Kasper Nilsson 18ded36feb Fix Gerrit global scoping issue
I47a487e3 added the definition of the Gerrit global to help enable
Closure compilation. However, the object created by
`let Gerrit = window.Gerrit || {}` was never reassigned to
window.Gerrit, leading to window.Gerrit being initialized to a different
empty object when the first behavior was loaded.

A gr-endpoint-decorator element is included in gr-app.html. For that
specific endpoint, the Gerrit object referenced in
gr-endpoint-decorator.js was not the window.Gerrit object that contained
the properly initialized endpoints.

With this change, the object reference is reassigned window.Gerrit in
every root view touched by the aforementioned change.

Change-Id: I0d571918043311ac07a966d0faf126d355b55a5b
2018-09-19 14:08:46 -07:00

31 lines
1.4 KiB
HTML

<!--
@license
Copyright (C) 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script>
// Needed for JSCompiler to understand it's global.
// eslint-disable-next-line no-unused-vars, prefer-const
let Gerrit = window.Gerrit || {};
window.Gerrit = Gerrit;
</script>
<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../elements/change/gr-change-view/gr-change-view.html">
<link rel="import" href="../elements/core/gr-search-bar/gr-search-bar.html">
<link rel="import" href="../elements/diff/gr-diff-view/gr-diff-view.html">
<link rel="import" href="../elements/change-list/gr-change-list-view/gr-change-list-view.html">
<link rel="import" href="../elements/change-list/gr-change-list/gr-change-list.html">
<link rel="import" href="../elements/change-list/gr-dashboard-view/gr-dashboard-view.html">
<link rel="import" href="../styles/themes/app-theme.html">