From 753dad8d9f4bb234a2186b19e28bb33137b75dec Mon Sep 17 00:00:00 2001 From: leekelleher Date: Mon, 13 May 2024 18:32:01 +0100 Subject: [PATCH] Event target type casting --- .../document-type-workspace-view-structure.element.ts | 6 ++---- .../property-editor-ui-markdown-editor.element.ts | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/views/structure/document-type-workspace-view-structure.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/views/structure/document-type-workspace-view-structure.element.ts index 77f7b4777b..9cfd4c2664 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/views/structure/document-type-workspace-view-structure.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/views/structure/document-type-workspace-view-structure.element.ts @@ -83,10 +83,8 @@ export class UmbDocumentTypeWorkspaceViewStructureElement extends UmbLitElement { + const sortedContentTypesList: Array = e.target.selection.map((id, index) => ({ contentType: { unique: id }, sortOrder: index, })); diff --git a/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/property-editors/markdown-editor/property-editor-ui-markdown-editor.element.ts b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/property-editors/markdown-editor/property-editor-ui-markdown-editor.element.ts index 0b3bc0e0d0..407ef70206 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/property-editors/markdown-editor/property-editor-ui-markdown-editor.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/property-editors/markdown-editor/property-editor-ui-markdown-editor.element.ts @@ -27,8 +27,8 @@ export class UmbPropertyEditorUIMarkdownEditorElement extends UmbLitElement impl this._overlaySize = config?.getValueByAlias('overlaySize') ?? undefined; } - #onChange(e: Event) { - this.value = (e.target as UmbInputMarkdownElement).value as string; + #onChange(event: Event & { target: UmbInputMarkdownElement }) { + this.value = event.target.value as string; this.dispatchEvent(new UmbPropertyValueChangeEvent()); }