mirror of
https://github.com/maputnik/editor.git
synced 2026-02-08 13:40:00 +00:00
Apply suggestions from code review
This commit is contained in:
@@ -11,10 +11,10 @@ function loadJSON(url: string, defaultValue: any, cb: (...args: any[]) => void)
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then((body) =>{
|
||||
.then((body) => {
|
||||
cb(body)
|
||||
})
|
||||
.catch(() =>{
|
||||
.catch(() => {
|
||||
console.warn('Can not load metadata for ' + url + ', using default value ' + defaultValue);
|
||||
cb(defaultValue)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user