From 0b8d9e3d826f4e02d4201954a6532c1ed7e09f12 Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Sun, 30 Apr 2017 23:33:53 -0400 Subject: [PATCH] Simplify state management of viewing page Explicitly set the page being viewed to "discover" instead of just rendering the discover page if none is set. Eliminates several real or possible bugs and edge cases. --- ui/js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/js/app.js b/ui/js/app.js index bf0bd4723..4a11a858b 100644 --- a/ui/js/app.js +++ b/ui/js/app.js @@ -81,6 +81,7 @@ var App = React.createClass({ drawerOpenRaw = sessionStorage.getItem('drawerOpen'); return Object.assign(this.getViewingPageAndArgs(window.location.search), { + viewingPage: 'discover', drawerOpen: drawerOpenRaw !== null ? JSON.parse(drawerOpenRaw) : true, errorInfo: null, modal: null, @@ -249,7 +250,6 @@ var App = React.createClass({ case 'developer': return ["Developer", "icon-file", ]; case 'discover': - default: return ["Home", "icon-home", ]; } },