fix JS error, if we have no image and no _iconNode

This commit is contained in:
ralf 2022-08-03 16:27:23 +02:00
parent c3673b1126
commit bd555ec4d1

View File

@ -283,8 +283,12 @@ export class Et2Button extends Et2InputWidget(SlButton)
const image = document.createElement("et2-image");
image.slot = "prefix";
this.prepend(image);
image.src = this.__image;
}
else if (this._iconNode)
{
this._iconNode.src = this.__image;
}
this._iconNode.src = this.__image;
}
}