From ebe5ff486c8e14816d9ff811e8930231eadb86e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 4 Jan 2023 10:12:04 +0100 Subject: [PATCH] clean up --- .../views/collection-view-media-table.element.ts | 8 ++++---- .../backoffice-header-sections.element.ts | 4 ++-- .../backoffice-frame/backoffice-main.element.ts | 2 +- .../content-property/content-property.element.ts | 2 +- .../shared/components/section/section.element.ts | 10 +++++----- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/collection/views/collection-view-media-table.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/collection/views/collection-view-media-table.element.ts index 38e2b45c39..069e3c8c9e 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/collection/views/collection-view-media-table.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/collection/views/collection-view-media-table.element.ts @@ -28,12 +28,12 @@ export class UmbCollectionViewMediaTableElement extends UmbLitElement { private _observeCollectionContext() { if (!this._collectionContext) return; - this.observe>(this._collectionContext.data, (nodes) => { - this._mediaItems = nodes || undefined; + this.observe(this._collectionContext.data, (nodes) => { + this._mediaItems = nodes; }); - this.observe>(this._collectionContext.selection, (selection) => { - this._selection = selection || undefined; + this.observe(this._collectionContext.selection, (selection) => { + this._selection = selection; }); } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/backoffice-frame/backoffice-header-sections.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/backoffice-frame/backoffice-header-sections.element.ts index cc0d289731..7cd6c21bed 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/backoffice-frame/backoffice-header-sections.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/backoffice-frame/backoffice-header-sections.element.ts @@ -87,7 +87,7 @@ export class UmbBackofficeHeaderSections extends UmbLitElement { private _observeSections() { if (!this._sectionStore) return; - this.observe(this._sectionStore?.getAllowed(), (allowedSections) => { + this.observe(this._sectionStore.getAllowed(), (allowedSections) => { this._sections = allowedSections; this._visibleSections = this._sections; }); @@ -96,7 +96,7 @@ export class UmbBackofficeHeaderSections extends UmbLitElement { private _observeCurrentSection() { if (!this._sectionStore) return; - this.observe(this._sectionStore.currentAlias, (currentSectionAlias) => { + this.observe(this._sectionStore.currentAlias, (currentSectionAlias) => { this._currentSectionAlias = currentSectionAlias; }); } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/backoffice-frame/backoffice-main.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/backoffice-frame/backoffice-main.element.ts index 7b1ebb66c2..b9d6226019 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/backoffice-frame/backoffice-main.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/backoffice-frame/backoffice-main.element.ts @@ -50,7 +50,7 @@ export class UmbBackofficeMain extends UmbLitElement { private async _observeSections() { if (!this._sectionStore) return; - this.observe(this._sectionStore?.getAllowed(), (sections) => { + this.observe(this._sectionStore.getAllowed(), (sections) => { this._sections = sections; if (!sections) return; this._createRoutes(); diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/content-property/content-property.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/content-property/content-property.element.ts index 2dc2f5025a..8ee254f491 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/content-property/content-property.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/content-property/content-property.element.ts @@ -55,7 +55,7 @@ export class UmbContentPropertyElement extends UmbLitElement { private _observeDataType() { if (!this._dataTypeStore || !this._property) return; - this.observe( + this.observe( this._dataTypeStore.getByKey(this._property.dataTypeKey).pipe( switchMap((dataType) => { if (!dataType?.propertyEditorUIAlias) return EMPTY; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/section/section.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/section/section.element.ts index 4bcee858ab..3a0aedd0af 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/section/section.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/section/section.element.ts @@ -59,7 +59,7 @@ export class UmbSectionElement extends UmbLitElement { private _observeTrees() { if (!this._sectionContext) return; - this.observe( + this.observe( this._sectionContext?.data.pipe( switchMap((section) => { if (!section) return EMPTY; @@ -71,13 +71,13 @@ export class UmbSectionElement extends UmbLitElement { }) ), (trees) => { - this._trees = trees || undefined; + this._trees = trees; this._createTreeRoutes(); } ); - this.observe(umbExtensionsRegistry?.extensionsOfType('workspace'), (workspaceExtensions) => { - this._workspaces = workspaceExtensions || undefined; + this.observe(umbExtensionsRegistry.extensionsOfType('workspace'), (workspaceExtensions) => { + this._workspaces = workspaceExtensions; this._createTreeRoutes(); }); } @@ -117,7 +117,7 @@ export class UmbSectionElement extends UmbLitElement { private _observeViews() { if (!this._sectionContext) return; - this.observe( + this.observe( this._sectionContext.data.pipe( switchMap((section) => { if (!section) return EMPTY;