Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Source url could be undefined -- check before calling .split or performing other operations on it #1333

Open
jseppi opened this issue Aug 21, 2020 · 1 comment

Comments

@jseppi
Copy link
Contributor

jseppi commented Aug 21, 2020

On this line in _getAttribution:

var source = style.sources[id].url.split('mapbox://')[1];

Each source url has .split() called on it. If a source without a url property (such as a geojson source) is present in the style, this line will cause an uncaught error.

@jseppi
Copy link
Contributor Author

jseppi commented Aug 21, 2020

Potentially the same issue as #1295

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant