This is a simple issue with a simple fix, but I’m confused as to why it’s happening.
If you set a text element’s text to 0 via:
this.entity.element.text = 0;
the text element sets its text to
"" and prints nothing.
The simple fix would be to change it to
this.entity.element.text = "" + 0;
but it’s strange that this is occurring in the first place.
My guess, which might be completely off, is that internally there’s a check of the same kind as
0 == '' which evaluates to true thanks to js’s strange rules.