cferdinandi / cferdinandi/bin

"Unexpected token in JSON" error

Open
#1 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
85
Forks
7
PR merge metrics
No merged PRs in 30d

Description

**Test case:** https://codepen.io/fernandocanizo/pen/GRgWZmE?editors=1010

I'm having an error on library loading phase (or maybe in the `get`) which I cannot reproduce on linked CodePen: (behaves normal, works). But the same in my page doesn't work. it throws me:
```
bin.min.js:2 Uncaught SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse ()
at e.get (bin.min.js:2)
at app.js:6
```

`app.js:6` has either:
- `const taskList = savedTaskList.get();` or
- `const taskList = savedTaskList.get([]);` (default to Array).

Tested with version `0.0.2` and `latest`.

Importing the library via CDN with:
```

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.