Skip to content

Throw error when passing non "JSON parsable" strings to props #266

@ctmm

Description

@ctmm

When passing a string with an array I would expect the console to throw an error in case my prop is not parsable as JSON.

Currently, it fails silently.

Example:

<my-component my-attribute="['index0', 'index1', 'index3']"></my-component>

In this example I would expect an error in the console containing a message like:
Couldn't parse "my-attribute" as JSON. Make sure you're using valid JSON syntax on this attribute's value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions