supermedium/superframe

[state] `bind-for` interpolation converts `0` to empty string

Opened this issue · 1 comments

When using string interpolation in bind-for, e.g., data-order="{{sortOrder}}", the value of 0 gets converted to an empty string, rather than returning 0.

initialState: {
  users: [
    sortOrder: 0,
    ...
  ]
}
<a-entity bind-for ...>
  <template>
    <a-entity data-order="{{sortOrder}}"></a-entity>
  </template>
</a-entity>

The above results as below when the value is 0:

<a-entity data-order=""></a-entity>

This is happening in version 6.8.0, but haven't checked against all other versions yet.