Subscribe on changes!

toString not working as expected when binding to a class

avatar
Sep 10th 2020

Version

3.0.0-rc.10

Reproduction link

https://codepen.io/baryla/pen/GRZxPNx

Steps to reproduce

Bind an object with a toString method to a class attribute.

What is expected?

class attribute should have the string returned from the toString function same as any other attribute (like data-test from the repro).

What is actually happening?

class attribute returns "name toString", so the actual object blueprint.

avatar
Sep 10th 2020

The semantics of binding class to an object is using its keys as classes to be displayed. It would be a breaking change to use the toString() value instead.