From e92846ca0fbae306ee641b39d9cfa2cb1d61a518 Mon Sep 17 00:00:00 2001
From: Filipa Lacerda <filipa@gitlab.com>
Date: Thu, 5 Jan 2017 10:10:22 +0000
Subject: [PATCH] Adds CHANGELOG entry

---
 .../environments/components/environment_item.js.es6           | 4 ++--
 .../javascripts/environments/stores/environments_store.js.es6 | 2 +-
 changelogs/unreleased/25725-remove-window-object.yml          | 4 ++++
 3 files changed, 7 insertions(+), 3 deletions(-)
 create mode 100644 changelogs/unreleased/25725-remove-window-object.yml

diff --git a/app/assets/javascripts/environments/components/environment_item.js.es6 b/app/assets/javascripts/environments/components/environment_item.js.es6
index d9a78c592b0..0e6bc3fdb2c 100644
--- a/app/assets/javascripts/environments/components/environment_item.js.es6
+++ b/app/assets/javascripts/environments/components/environment_item.js.es6
@@ -23,8 +23,8 @@
    */
 
   window.gl = window.gl || {};
-  gl.environmentsList = window.gl.environmentsList || {};
-  gl.environmentsList.timeagoInstance = new timeago(); // eslint-disable-line
+  window.gl.environmentsList = window.gl.environmentsList || {};
+  window.gl.environmentsList.timeagoInstance = new timeago(); // eslint-disable-line
 
   gl.environmentsList.EnvironmentItem = Vue.component('environment-item', {
 
diff --git a/app/assets/javascripts/environments/stores/environments_store.js.es6 b/app/assets/javascripts/environments/stores/environments_store.js.es6
index 97d65521a96..0204a903ab5 100644
--- a/app/assets/javascripts/environments/stores/environments_store.js.es6
+++ b/app/assets/javascripts/environments/stores/environments_store.js.es6
@@ -1,7 +1,7 @@
 /* eslint-disable no-param-reassign */
 (() => {
   window.gl = window.gl || {};
-  gl.environmentsList = window.gl.environmentsList || {};
+  window.gl.environmentsList = window.gl.environmentsList || {};
 
   gl.environmentsList.EnvironmentsStore = {
     state: {},
diff --git a/changelogs/unreleased/25725-remove-window-object.yml b/changelogs/unreleased/25725-remove-window-object.yml
new file mode 100644
index 00000000000..c64b71ddd33
--- /dev/null
+++ b/changelogs/unreleased/25725-remove-window-object.yml
@@ -0,0 +1,4 @@
+---
+title: Removes unneeded `window` declaration in environments related code
+merge_request: 8456
+author:
-- 
GitLab