Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Reapply polyfill and rearange mainjs #1576

Benjamin King4d66ea283564
diff --git a/web/js/redux-config-helpers.js b/web/js/combine-middleware.js
similarity index 100%
rename from web/js/redux-config-helpers.js
rename to web/js/combine-middleware.js
diff --git a/web/js/location.js b/web/js/location.js
index e15187cdd..65cb8e089 100644
--- a/web/js/location.js
+++ b/web/js/location.js
@@ -40,7 +40,6 @@ export function getParamObject(
let eventParamObject = {};
let tourParamObject = {};
let animationParamObject = {};
- models.proj.load(legacyState, []);
const mapParamObject = getMapParameterSetup(
parameters,
diff --git a/web/js/main.js b/web/js/main.js
index 7511a4593..b0b7260c7 100644
--- a/web/js/main.js
+++ b/web/js/main.js
@@ -5,7 +5,7 @@ import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import { each as lodashEach, debounce as lodashDebounce } from 'lodash';
-import { getMiddleware } from './redux-config-helpers';
+import { getMiddleware } from './combine-middleware';
import {
createReduxLocationActions,
listenForHistoryChange
@@ -25,6 +25,7 @@ import { combineUi } from './combine-ui';
import palettes from './palettes/palettes';
import { updateLegacyModule } from './modules/migration/actions';
import { validate as layerValidate } from './layers/layers';
+import { polyfill } from './polyfill';
const history = createBrowserHistory();
const isDevelop = !!(
@@ -44,6 +45,7 @@ window.onload = () => {
if (!parameters.elapsed) {
elapsed = function() {};
}
+ polyfill();
elapsed('loading config', startTime, parameters);
var promise = $.getJSON(configURI);
diff --git a/web/js/redux-location-state-customs.js b/web/js/redux-location-state-customs.js
index cb372ab6b..e20eb7944 100644
--- a/web/js/redux-location-state-customs.js
+++ b/web/js/redux-location-state-customs.js
@@ -6,21 +6,8 @@ import {
} from 'redux-location-state/lib/helpers';
import isEqualDate from 'date-fns/is_equal';
import { typeHandles } from 'redux-location-state/lib/typeHandles';
+import { ENCODING_EXCEPTIONS } from './modules/link/constants';
-const ENCODING_EXCEPTIONS = [
- {
- match: new RegExp('%2C', 'g'),
- replace: ','
- },
- {
- match: new RegExp('%3B', 'g'),
- replace: ';'
- },
- {
- match: new RegExp('%3D', 'g'),
- replace: '='
- }
-];
function isNotDefined(value) {
return typeof value === 'undefined' || value === null;
}