(url)
| 339 | var promises = []; |
| 340 | |
| 341 | function fetch(url) { |
| 342 | return new Promise(function (resolve, reject) { |
| 343 | d3.json(url, function (err, d) { |
| 344 | if (err) { |
| 345 | delete PlotlyGeoAssets[url]; |
| 346 | var msg = |
| 347 | err.status === 404 |
| 348 | ? 'GeoJSON at URL "' + url + '" does not exist.' |
| 349 | : 'Unexpected error while fetching from ' + url; |
| 350 | return reject(new Error(msg)); |
| 351 | } |
| 352 | |
| 353 | PlotlyGeoAssets[url] = d; |
| 354 | return resolve(d); |
| 355 | }); |
| 356 | }); |
| 357 | } |
| 358 | |
| 359 | function wait(url) { |
| 360 | return new Promise(function (resolve, reject) { |
no outgoing calls
no test coverage detected
searching dependent graphs…