Skip to content

Commit d0a70c8

Browse files
Update src/Umbraco.Web.UI.Client/src/libs/controller-api/controller-host.mixin.ts
Co-authored-by: Copilot <[email protected]>
1 parent cc51e74 commit d0a70c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Umbraco.Web.UI.Client/src/libs/controller-api/controller-host.mixin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const UmbControllerHostMixin = <T extends ClassConstructor>(superClass: T
6161
// If a controller is created on a already attached element, then it will be added directly. This might not be optimal. As the controller it self has not finished its constructor method jet. therefor i postpone the call: [NL]
6262
Promise.resolve().then(() => {
6363
// Extra check to see if we are still attached and still added at this point:
64-
if (this.#attached && this.#controllers.indexOf(ctrl) !== -1) {
64+
if (this.#attached && this.#controllers.includes(ctrl)) {
6565
ctrl.hostConnected();
6666
}
6767
});

0 commit comments

Comments
 (0)