align with the activeModalPath

This commit is contained in:
Niels Lyngsø
2024-03-18 14:31:40 +01:00
parent 8ed1e6add4
commit 46a91e1d32

View File

@@ -125,7 +125,7 @@ export class UmbRouteContext extends UmbControllerBase {
if (this.#activeModalPath) {
// If if there is a modal using the old path.
const activeModal = this.#modalRegistrations.find((registration) => {
return '/' + registration.generateModalPath() === this.#activeModalPath;
return registration.generateModalPath() === this.#activeModalPath;
});
if (activeModal) {
this.#modalContext?.close(activeModal.key);