diff --git a/src/containers/DefaultContainer.vue b/src/containers/DefaultContainer.vue index 27fd69019..952ea9584 100644 --- a/src/containers/DefaultContainer.vue +++ b/src/containers/DefaultContainer.vue @@ -202,29 +202,26 @@ export default { mounted() { if (this.$dtrack && this.$dtrack.version.includes('SNAPSHOT')) { this.$root.$emit('bv::show::modal', 'snapshotModal'); + } - this.isSidebarMinimized = - localStorage && localStorage.getItem('isSidebarMinimized') !== null - ? localStorage.getItem('isSidebarMinimized') === 'true' - : false; - const sidebar = document.body; - if (sidebar) { - if (this.isSidebarMinimized) { - sidebar.classList.add('sidebar-minimized'); - } else { - sidebar.classList.remove('sidebar-minimized'); - } + this.isSidebarMinimized = + localStorage && localStorage.getItem('isSidebarMinimized') !== null + ? localStorage.getItem('isSidebarMinimized') === 'true' + : false; + const sidebar = document.body; + if (sidebar) { + if (this.isSidebarMinimized) { + sidebar.classList.add('sidebar-minimized'); + } else { + sidebar.classList.remove('sidebar-minimized'); } - this.$nextTick(() => { - const sidebarMinimizer = this.$el.querySelector('.sidebar-minimizer'); - if (sidebarMinimizer) { - sidebarMinimizer.addEventListener( - 'click', - this.handleMinimizedUpdate, - ); - } - }); } + this.$nextTick(() => { + const sidebarMinimizer = this.$el.querySelector('.sidebar-minimizer'); + if (sidebarMinimizer) { + sidebarMinimizer.addEventListener('click', this.handleMinimizedUpdate); + } + }); }, computed: { name() {