mirror of
https://github.com/maputnik/editor.git
synced 2025-12-24 15:10:01 +00:00
Added try/catch around mapboxUtil.normalizeSourceURL
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user