DEV: Check if show-modal container is viable (#16170)

This commit is contained in:
Jarek Radosz
2022-03-14 15:14:42 +01:00
committed by GitHub
parent bb153c49a1
commit 172d030a45
@@ -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.