biotope / biotope/biotope-element

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

Open
#266 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
15
Forks
5
PR merge metrics
No merged PRs in 30d

Description

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:
```html

```

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.`

Contributor guide

Open the contributing guide

Research direction

No source file or test is named in the issue. Start by locating the prop/attribute parsing entry point in the TypeScript web-component code and reproduce the HTML example; done means invalid JSON produces the requested console error while valid values continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.