Cannot read property 'match' of undefined
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- frontend
Research direction
Start with the isDataURL function shown in the report and trace the leafletImage(map.leafletElement, ...) call in the React Leaflet integration to find where url becomes undefined. Reproduce the error with the reported usage, then verify that the data-URL check handles the relevant input without throwing.
Written by the indexing model from the issue text.
Description
It occurs in this function,
function isDataURL(url) {
var dataURLRegex = /^\sdata:([a-z]+/[a-z]+(;[a-z-]+=[a-z-]+)?)?(;base64)?,[a-z0-9!$&',()*+,;=-._~:@/?%\s]\s*$/i;
return !!url.match(dataURLRegex);
}
I am passing it like this,
leafletImage(map.leafletElement, fn(err, canvas){
});
map is a react leaflet map
- Dominant language
- JavaScript
- Stars
- 380
- Forks
- 140
- PR merge metrics
- No merged PRs in 30d
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.
More from mapbox/leaflet-image
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
mapbox/leaflet-image#145 ·
-
ERR! code E404 Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
mapbox/leaflet-image#143 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
mapbox/leaflet-image#142 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
mapbox/leaflet-image#141 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
mapbox/leaflet-image#140 · 1 comment ·
All issues in mapbox/leaflet-image
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·