From cd95fe353d5bfd1e4d0bf8ae4652c17444f2ba4b Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Thu, 4 Jul 2024 08:42:31 +0200 Subject: [PATCH] fix: add getter and fix setter type to make jsonschema happy --- .../components/block-type-card/block-type-card.element.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-type/components/block-type-card/block-type-card.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-type/components/block-type-card/block-type-card.element.ts index 9bd0f77082..396e1536f9 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-type/components/block-type-card/block-type-card.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-type/components/block-type-card/block-type-card.element.ts @@ -24,16 +24,20 @@ export class UmbBlockTypeCardElement extends UmbLitElement { href?: string; @property({ type: String, attribute: false }) - public set iconFile(value: string | undefined) { + public set iconFile(value: string) { value = transformServerPathToClientPath(value); if (value) { this.#init.then(() => { - this._iconFile = this.#appUrl! + removeInitialSlashFromPath(value); + this._iconFile = this.#appUrl + removeInitialSlashFromPath(value); }); } else { this._iconFile = undefined; } } + public get iconFile(): string | undefined { + return this._iconFile; + } + @state() private _iconFile?: string | undefined;