include active path as well
This commit is contained in:
@@ -72,15 +72,10 @@ export class UmbRouteContext extends UmbBaseController {
|
||||
}
|
||||
|
||||
#removeModalPath(info: IRoutingInfo) {
|
||||
/*
|
||||
NOTICE:
|
||||
This piece of code remove the last occurrence of the modal path from the current url.
|
||||
This means if the same type of modal is opened multiple times, the url will be cleaned from the last opened modal.
|
||||
This is okay for now as we do not have any situations where we close a parent modal before a child modal.
|
||||
*/
|
||||
// Reset the URL to the routerBasePath
|
||||
const folderToRemove = info.match.match.input;
|
||||
if (folderToRemove && window.location.href.includes(folderToRemove)) {
|
||||
window.history.pushState({}, '', this.#routerBasePath);
|
||||
window.history.pushState({}, '', this.#routerBasePath + '/' + this.#routerActiveLocalPath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user