Skip to content

Use toString() on object interpolation when defined #8093

Closed
@mathieutu

Description

@mathieutu

Version

2.5.16

Reproduction link

Edit Vue Template

Steps to reproduce

When interpoling a object, it uses the JSON.stringify method instead of toString, which is normally the proper method to set a way to convert an object to a string. We could try to see if the toString method is present before calling the toJSON one ?

What is expected?

In the fiddle:

string: test

What is actually happening?

In the fiddle:

string: { "json": "jsonVal" }


Thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions