Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dsinni opened this issue Oct 3, 2019 · 1 comment
Open

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

dsinni opened this issue Oct 3, 2019 · 1 comment

Comments

@dsinni
Copy link
Contributor

dsinni commented Oct 3, 2019

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>
@dsinni
Copy link
Contributor Author

dsinni commented Oct 10, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant