Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

handle edge case

Jason Kentcdf07bccaca7
diff --git a/web/js/components/layer/info/info-modal.js b/web/js/components/layer/info/info-modal.js
index 142df29da..f6cd55a3b 100644
--- a/web/js/components/layer/info/info-modal.js
+++ b/web/js/components/layer/info/info-modal.js
@@ -11,7 +11,7 @@ export default function LayerInfoModal(props) {
if (!metadata && measurementDescriptionPath) {
const url = `config/metadata/layers/${measurementDescriptionPath}.html`;
const data = await util.get(url);
- setMetadata(data || 'No metadata found.');
+ setMetadata(data);
}
};
diff --git a/web/js/components/layer/product-picker/browse/measurement-metadata-detail.js b/web/js/components/layer/product-picker/browse/measurement-metadata-detail.js
index 5f6952648..f2880853c 100644
--- a/web/js/components/layer/product-picker/browse/measurement-metadata-detail.js
+++ b/web/js/components/layer/product-picker/browse/measurement-metadata-detail.js
@@ -26,7 +26,11 @@ function MeasurementMetadataDetail (props) {
metadata[metadataPath] = { data };
setMetadata(metadata);
setLoading(false);
- }).catch(() => { setLoading(false); });
+ }).finally(() => {
+ setLoading(false);
+ });
+ } else {
+ setLoading(false);
}
}, [source]);