From 9fac8c7a0475a034282b276e68e7b9f8cc8101e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 25 May 2022 19:06:55 +0200 Subject: [PATCH] more comment --- .../src/settings/settings-section.element.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/settings/settings-section.element.ts b/src/Umbraco.Web.UI.Client/src/settings/settings-section.element.ts index 867c7d5c11..983f607e99 100644 --- a/src/Umbraco.Web.UI.Client/src/settings/settings-section.element.ts +++ b/src/Umbraco.Web.UI.Client/src/settings/settings-section.element.ts @@ -25,7 +25,9 @@ export class UmbSettingsSection extends UmbContextConsumerMixin(LitElement) { // Generally that means that a web component must have the ControllerMixin?? and then controllers can easily be attached, they would know about life cycle and thereby be able to unsubscribe on disconnected etc. // // All code regarding subscription could be boiled down to: - //OurUmbracoSubscribeMethod(this, this._extensionRegistry.extensions, (extensions) => {}); // uses `this` to append the subscription to the controller array. + // OurUmbracoSubscribeMethod(this, this._extensionRegistry.extensions, (extensions) => {}); // uses `this` to append the subscription to the controller array. + // Or: + // this.attachSubscription(this._extensionRegistry.extensions, (extensions) => {}); this._extensionsSubscription = this._extensionRegistry.extensions.subscribe(extensions => { this._extensions = [...extensions];// TODO: Though, this is a shallow clone, wouldn't we either do a deep clone or no clone at all? });