more than 1 call to JsBarcode errors api.options(...)[options.format] is not a function
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.9k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
```
var upc=new Image()
new JsBarcode(
upc,
"796030114977",
{
format: "UPC",
width: 3,
height: 80,
}
)
var cno=new Image()
new JsBarcode(
cno,
"796030114977",
{
format: "UPC",
width: 3,
height: 80,
}
)
```
on the second call i get
```
runtime-core.esm-bundler.js?5c40:218 Uncaught TypeError: api.options(...)[options.format] is not a function
at JsBarcode (JsBarcode.js?62c5:76)
...
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at JsBarcode.js around line 76 and reproduce the two consecutive JsBarcode calls shown in the issue. Trace why the second call reaches the reported options.format error, then verify that the same two-call example completes without the exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100