Skip to content

Commit

Permalink
Fix usage of String.includes which is es6 but not transformed by buble (
Browse files Browse the repository at this point in the history
  • Loading branch information
ahk authored and mourner committed Jul 29, 2019
1 parent 17b4c7d commit 4ffd0e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/mapbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export class RequestManager {
if (accessToken[0] === 's')
throw new Error(`Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ${help}`);

urlObject.params = urlObject.params.filter((d) => !d.includes('access_token'));
urlObject.params = urlObject.params.filter((d) => d.indexOf('access_token') === -1);
urlObject.params.push(`access_token=${accessToken}`);
return formatUrl(urlObject);
}
Expand Down

0 comments on commit 4ffd0e2

Please sign in to comment.