Skip to content

Commit

Permalink
Make sure things still work in dev mode if you have no cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
John Cowen committed Dec 17, 2019
1 parent cf24ecb commit 62867d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ui-v2/app/env.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import _config from './config/environment';
const doc = document;
const getDevEnvVars = function() {
return doc.cookie.split(';').map(item => item.trim().split('='));
return doc.cookie
.split(';')
.filter(item => item !== '')
.map(item => item.trim().split('='));
};
const getUserEnvVar = function(str) {
return window.localStorage.getItem(str);
Expand Down

0 comments on commit 62867d0

Please sign in to comment.