do not update modal route unless a change

This commit is contained in:
Niels Lyngsø
2023-06-07 16:44:23 +02:00
parent 70413bd5e5
commit 73bfbe7f8b

View File

@@ -108,6 +108,9 @@ export class UmbModalRouteRegistrationController<D extends object = object, R =
`Identifier ${identifier} was not registered at the construction of the modal registration controller, it has to be.`
);
}
const oldValue = this.#uniquePaths.get(identifier);
if(oldValue === value) return;
this.#uniquePaths.set(identifier, value);
this.#registerModal();
}