From 81e498adb8a23a4ae0b815d3c1215a9e1f219e33 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 23 Sep 2021 09:44:10 +0300 Subject: [PATCH] Rename the global `version` variable to `svgomgVersion` --- src/index.html | 2 +- src/js/page/main-controller.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.html b/src/index.html index af7c756e9..07bad4672 100644 --- a/src/index.html +++ b/src/index.html @@ -16,7 +16,7 @@ ga('create', 'UA-58850134-1', 'auto'); ga('send', 'pageview'); - window.version = "{{changelog[0].version}}"; + window.svgomgVersion = "{{changelog[0].version}}"; // Delay analytics until after the page has loaded, to avoid extending // the browser spinner, and allow higher priority stuff through. diff --git a/src/js/page/main-controller.js b/src/js/page/main-controller.js index 71908cd0d..914f1e27e 100644 --- a/src/js/page/main-controller.js +++ b/src/js/page/main-controller.js @@ -35,7 +35,7 @@ export default class MainController { this._toastsUi = new Toasts(); this._dropUi = new FileDrop(); this._preloaderUi = new Preloader(); - this._changelogUi = new Changelog(self.version); + this._changelogUi = new Changelog(self.svgomgVersion); this._resultsContainerUi = new ResultsContainer(this._resultsUi); this._viewTogglerUi = new ViewToggler(); @@ -80,7 +80,7 @@ export default class MainController { // tell the user about the latest update storage.get('last-seen-version').then((lastSeenVersion) => { if (lastSeenVersion) this._changelogUi.showLogFrom(lastSeenVersion); - storage.set('last-seen-version', self.version); + storage.set('last-seen-version', self.svgomgVersion); }); domReady.then(() => {