mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-27 09:45:29 +01:00
Added try/catch around mapboxUtil.normalizeSourceURL
This commit is contained in:
parent
9d96525f12
commit
0ebb299fd0
1 changed files with 6 additions and 1 deletions
|
@ -203,7 +203,12 @@ export default class App extends React.Component {
|
|||
};
|
||||
|
||||
if(!this.state.sources.hasOwnProperty(key) && val.type === "vector") {
|
||||
const url = mapboxUtil.normalizeSourceURL(val.url, MapboxGl.accessToken);
|
||||
let url = val.url;
|
||||
try {
|
||||
url = mapboxUtil.normalizeSourceURL(url, MapboxGl.accessToken);
|
||||
} catch(err) {
|
||||
console.warn("Failed to normalizeSourceURL: ", err);
|
||||
}
|
||||
|
||||
fetch(url)
|
||||
.then((response) => {
|
||||
|
|
Loading…
Reference in a new issue