diff --git a/src/app/tabs/settings-tab.js b/src/app/tabs/settings-tab.js index 6a8190585c..8721e78063 100644 --- a/src/app/tabs/settings-tab.js +++ b/src/app/tabs/settings-tab.js @@ -54,8 +54,7 @@ module.exports = class SettingsTab { self._deps.compiler.setOptimize(self.data.optimize) self.data.currentTheme = self._components.themeStorage.get('theme') || 'light' - var compilerEvent = self._components.registry.get('compiler').event - compilerEvent.register('compilerLoaded', (version) => self.setVersionText(version)) + self._deps.compiler.event.register('compilerLoaded', (version) => self.setVersionText(version)) self.fetchAllVersion((allversions, selectedVersion) => { self.data.allversions = allversions self.data.selectedVersion = selectedVersion diff --git a/src/app/tabs/support-tab.js b/src/app/tabs/support-tab.js index 85482c533d..1131e16e35 100644 --- a/src/app/tabs/support-tab.js +++ b/src/app/tabs/support-tab.js @@ -15,9 +15,12 @@ module.exports = class SupportTab { self.data = { gitterIsLoaded: false } self._components = {} self._components.registry = localRegistry || globalRegistry + + self._deps = { + app: self._components.registry.get('app').api + } - var appEvent = self._components.registry.get('app').event - appEvent.register('tabChanged', (tabName) => { + self._deps.app.event.register('tabChanged', (tabName) => { if (tabName !== 'Support' || self.data.gitterIsLoaded) return const iframe = yo`