Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fix linting issues and unit tests

Jason Kent03cf7923a145
diff --git a/web/js/modules/layers/actions.js b/web/js/modules/layers/actions.js
index 4dda53962..1f90c024f 100644
--- a/web/js/modules/layers/actions.js
+++ b/web/js/modules/layers/actions.js
@@ -56,7 +56,7 @@ export function addLayer(id, spec) {
event: 'layer_added',
layers: { id },
});
-
+
return (dispatch, getState) => {
const state = getState();
const { layers, compare, proj } = state;
diff --git a/web/js/util/browser.js b/web/js/util/browser.js
index 2fbae24b4..333e52782 100644
--- a/web/js/util/browser.js
+++ b/web/js/util/browser.js
@@ -56,21 +56,10 @@ export default (function() {
* @type Boolean
*/
self.webWorkers = true;
-
- /**
- * True if local storage is available in the browser. This will return
- * false if local storage is supported, but cannot be used because
- * it is running in private mode.
- *
- * @attribute localStorage
- * @type Boolean
- */
- self.localStorage = false;
self.history = true;
self.touchDevice = false;
self.mobileDevice = false;
self.mobileAndTabletDevice = false;
-
self.mobileWidth = 740;
self.constrainedHeight = 320;
diff --git a/web/js/util/browser.test.js b/web/js/util/browser.test.js
index 468ffc978..04bffdce4 100644
--- a/web/js/util/browser.test.js
+++ b/web/js/util/browser.test.js
@@ -65,15 +65,6 @@ test('non-working cors on Safari <= 6', () => {
expect(browser.tests.cors()).toBe(false);
});
-test('local storage', () => {
- expect(browser.tests.localStorage()).toBeTruthy();
-});
-
-test('no local storage', () => {
- browser.tests.window = () => undefined;
- expect(browser.tests.localStorage()).toBeFalsy();
-});
-
describe('device sizes', () => {
const tests = [
{
diff --git a/web/js/util/local-storage.js b/web/js/util/local-storage.js
index 7c0708b25..257b8acbd 100644
--- a/web/js/util/local-storage.js
+++ b/web/js/util/local-storage.js
@@ -17,7 +17,6 @@ const enabled = (function() {
export default {
enabled,
keys: {
- RECENT_LAYERS: 'recentlyAddedLayers',
DISMISSED_EVENT_VIS_ALERT: 'dismissedEventVisibilityAlert',
DISMISSED_COMPARE_ALERT: 'dismissedCompareAlert',
HIDE_TOUR: 'hideTour',
@@ -43,5 +42,3 @@ export default {
}
},
};
-
-export default safeLocalStorage;