correct cleanup

This commit is contained in:
Niels Lyngsø
2023-06-02 21:01:22 +02:00
parent a8561ecc0d
commit 152b7b1cdf

View File

@@ -171,14 +171,13 @@ export class UmbModalHandlerClass<ModalData extends object = object, ModalResult
this.host,
umbExtensionsRegistry.getByTypeAndAlias('modal', modalAlias),
async (manifest) => {
this.#removeInnerElement();
if (manifest) {
const innerElement = await this.#createInnerElement(manifest, data);
if (innerElement) {
this.#appendInnerElement(innerElement);
return;
}
}
this.#removeInnerElement();
}
);
}