diff --git a/app/assets/javascripts/sidebar.js.es6 b/app/assets/javascripts/sidebar.js.es6 index 0cd6f946f612d2a1f471ff2352a743e98e4567bc..755fac8107b3bc6c173f5cff65dd59f9c6e62f26 100644 --- a/app/assets/javascripts/sidebar.js.es6 +++ b/app/assets/javascripts/sidebar.js.es6 @@ -23,8 +23,6 @@ if (!singleton) { singleton = this; singleton.init(); - } else { - singleton.renderState(); } return singleton; } @@ -38,7 +36,8 @@ $(document) .on('click', sidebarToggleSelector, () => this.toggleSidebar()) .on('click', pinnedToggleSelector, () => this.togglePinnedState()) - .on('click', 'html, body', (e) => this.handleClickEvent(e)); + .on('click', 'html, body', (e) => this.handleClickEvent(e)) + .on('page:change', () => this.renderState()); this.renderState(); }