investigation clean up

This commit is contained in:
Niels Lyngsø
2023-05-17 20:46:05 +02:00
parent beb1d105f6
commit f2e55dc88a
9 changed files with 1 additions and 24 deletions

View File

@@ -111,8 +111,6 @@ export class UmbModalRouteRegistration<UmbModalTokenData extends object = object
};
routeSetup(router: IRouterSlot, modalContext: UmbModalContext, params: Params) {
console.log('routeSetup', this.active);
// If already open, don't do anything:
if (this.active) return;

View File

@@ -5,11 +5,11 @@ import '../../src/packages/search/search-modal/search-modal.element';
import type { UUIModalDialogElement, UUIModalSidebarSize } from '@umbraco-ui/uui';
import { BehaviorSubject } from 'rxjs';
import { appendToFrozenArray } from '../observable-api';
import { UmbModalHandler, UmbModalHandlerClass } from './modal-handler';
import type { UmbModalToken } from './token/modal-token';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
import { appendToFrozenArray } from '../observable-api';
export type UmbModalType = 'dialog' | 'sidebar';

View File

@@ -98,10 +98,8 @@ export class UmbRouteContext {
public _internal_modalRouterChanged(activeModalPath: string | undefined) {
if (this.#activeModalPath === activeModalPath) return;
if (this.#activeModalPath) {
console.log('_internal_modalRouterChanged', this.#activeModalPath);
// If if there is a modal using the old path.
const activeModal = this.#modalRegistrations.find((registration) => {
console.log('/' + registration.generateModalPath(), ' === ', this.#activeModalPath);
return '/' + registration.generateModalPath() === this.#activeModalPath;
});
if (activeModal) {