We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mapbox-gl-js version: 0.36.0 (and master at the time of writing)
Load the sprites and use them.
Sprites are not shown. Error thrown:
Error: Unable to parse URL object at parseUrl (src/util/mapbox.js:104:15) at Object.exports.normalizeSpriteURL (src/util/mapbox.js:64:23)
The origin of the error is a regular expression urlRe defined in src/util/mapbox.js, which doesn't match file:///path:
urlRe
file:///path
/^(\w+):\/\/([^/?]+)(\/[^?]+)?\??(.+)?/
It expects the "host" part of the URL (2nd capture group) to have some value, but in fact it can be empty (as in this case).
Making the 2nd capture group optional would fix the issue. Will provide a PR with the test case and a patch.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
mapbox-gl-js version: 0.36.0 (and master at the time of writing)
Steps to Trigger Behavior
Expected Behavior
Load the sprites and use them.
Actual Behavior
Sprites are not shown. Error thrown:
Origin
The origin of the error is a regular expression
urlRe
defined in src/util/mapbox.js, which doesn't matchfile:///path
:It expects the "host" part of the URL (2nd capture group) to have some value, but in fact it can be empty (as in this case).
Fixture
Making the 2nd capture group optional would fix the issue.
Will provide a PR with the test case and a patch.
The text was updated successfully, but these errors were encountered: