From dd292b31cc7b39d338edf2b5465943561e2d0ea0 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Fri, 23 Feb 2024 16:44:50 +0100 Subject: [PATCH] FIX: do not raise error on transition aborted (#25841) --- .../discourse/app/components/sidebar/switch-panel-buttons.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/discourse/app/components/sidebar/switch-panel-buttons.js b/app/assets/javascripts/discourse/app/components/sidebar/switch-panel-buttons.js index 4482faad44f..baf69d0f74a 100644 --- a/app/assets/javascripts/discourse/app/components/sidebar/switch-panel-buttons.js +++ b/app/assets/javascripts/discourse/app/components/sidebar/switch-panel-buttons.js @@ -31,6 +31,10 @@ export default class SwitchPanelButtons extends Component { try { await this.router.transitionTo(this.destination).followRedirects(); this.sidebarState.setPanel(this.currentPanel.key); + } catch (e) { + if (e.name !== "TransitionAborted") { + throw e; + } } finally { this.isSwitching = false; }