Do not proceed sizing for avatar widget if it's not in an accepted format

This commit is contained in:
hadi 2023-12-04 11:38:23 +01:00
parent e280f8cd2c
commit 6a67fa85cd

View File

@ -127,7 +127,7 @@ export class Et2Avatar extends Et2Widget(SlAvatar) implements et2_IDetachedDOM
}
if (changedProperties.has("size"))
{
if(this.size)
if(this.size && this.size.match(/\d/))
{
this.getDOMNode().setAttribute('style', `--size:${this.size}`);
}