fix: add getter and fix setter type to make jsonschema happy

This commit is contained in:
Jacob Overgaard
2024-07-04 08:42:31 +02:00
parent 207f11a25f
commit cd95fe353d

View File

@@ -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;