diff --git a/app/assets/javascripts/discourse/app/lib/show-modal.js b/app/assets/javascripts/discourse/app/lib/show-modal.js index dde3094b315..f2628490598 100644 --- a/app/assets/javascripts/discourse/app/lib/show-modal.js +++ b/app/assets/javascripts/discourse/app/lib/show-modal.js @@ -6,6 +6,9 @@ export default function (name, opts) { opts = opts || {}; let container = getOwner(this); + if (container.isDestroying || container.isDestroyed) { + return; + } // We use the container here because modals are like singletons // in Discourse. Only one can be shown with a particular state.