diff --git a/app/assets/javascripts/discourse/app/initializers/clean-dom-on-route-change.js b/app/assets/javascripts/discourse/app/initializers/clean-dom-on-route-change.js index e7f02766588..41d841f8d0e 100644 --- a/app/assets/javascripts/discourse/app/initializers/clean-dom-on-route-change.js +++ b/app/assets/javascripts/discourse/app/initializers/clean-dom-on-route-change.js @@ -40,6 +40,10 @@ export default { const router = container.lookup("router:main"); router.on("routeDidChange", (transition) => { + if (transition.isAborted) { + return; + } + scheduleOnce("afterRender", container, _clean, transition); }); },