biotope-element icon indicating copy to clipboard operation
biotope-element copied to clipboard

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

Open ctmm opened this issue 5 years ago • 1 comments

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.

ctmm avatar Nov 29 '19 15:11 ctmm