use match.route.path
This commit is contained in:
@@ -123,7 +123,7 @@ export class UmbRouteContext extends UmbContextBase<UmbRouteContext> {
|
||||
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);
|
||||
|
||||
@@ -122,7 +122,7 @@ export class UmbRouterSlotElement extends UmbLitElement {
|
||||
this.dispatchEvent(new UmbRouterSlotChangeEvent());
|
||||
}
|
||||
} else if (event.detail.slot === this.#modalRouter) {
|
||||
const newActiveModalLocalPath = this.#modalRouter.match?.fragments.consumed ?? '';
|
||||
const newActiveModalLocalPath = this.#modalRouter.match?.route.path ?? '';
|
||||
this.#routeContext._internal_modalRouterChanged(newActiveModalLocalPath);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user