Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fix issue with retrieving loaded palettes

Jason Kent699dc5267273
diff --git a/e2e/features/animation/gif-test.js b/e2e/features/animation/gif-test.js
index 8a967a0f9..50a5ff10f 100644
--- a/e2e/features/animation/gif-test.js
+++ b/e2e/features/animation/gif-test.js
@@ -6,7 +6,7 @@ const TIME_LIMIT = 30000; // Sometimes takes a while to generate GIFs
const askDialog = '.modal-body .notify';
const paletteDialogOkButton = '#image_download_notify_palette .accept-notify';
const rotationDialogOkButton = '#image_download_notify_rotate .accept-notify';
-const articeRotationResetButton = '#wv-map-arctic .wv-map-reset-rotation';
+const articeRotationResetButton = '.wv-map-reset-rotation';
module.exports = {
before(client) {
diff --git a/web/js/util/load.js b/web/js/util/load.js
index 30291c644..6215fd4f1 100644
--- a/web/js/util/load.js
+++ b/web/js/util/load.js
@@ -17,21 +17,21 @@ export default (function() {
}
if (root[attr] && lodashSize(root[attr]) > 0) {
- promise.resolve(root[attr]);
- } else {
- promise = fetch(brand.url(url))
- .then((response) => response.json())
- .then((result) => {
- root[attr] = result;
- return result;
- })
- .finally(() => {
- delete configPromises[url];
- })
- .catch((err) => console.log(err));
-
- configPromises[url] = promise;
+ return promise.resolve(root[attr]);
}
+ promise = fetch(brand.url(url))
+ .then((response) => response.json())
+ .then((result) => {
+ root[attr] = result;
+ return result;
+ })
+ .catch((err) => console.error(err))
+ .finally(() => {
+ delete configPromises[url];
+ });
+
+ configPromises[url] = promise;
+
return promise;
};