Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Added check for valid extent (#6907)

christof-wittreich3461cfdae3d5
diff --git a/web/js/mapUI/components/update-projection/updateProjection.js b/web/js/mapUI/components/update-projection/updateProjection.js
index f4ac0a511..ff84c7f9c 100644
--- a/web/js/mapUI/components/update-projection/updateProjection.js
+++ b/web/js/mapUI/components/update-projection/updateProjection.js
@@ -2,6 +2,7 @@ import { useEffect, useRef } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import OlLayerGroup from 'ol/layer/Group';
+import { isEmpty } from 'ol/extent';
import {
get as lodashGet,
} from 'lodash';
@@ -287,7 +288,7 @@ function UpdateProjection(props) {
const projId = proj.selected.id;
let extent = null;
let callback = null;
- if (models.map.extent) {
+ if (models.map.extent && !isEmpty(models.map.extent)) {
extent = models.map.extent;
} else if (!models.map.extent && projId === 'geographic') {
extent = getLeadingExtent(config.pageLoadTime);