0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-13 06:32:39 +00:00

Fixed bug where new page loaded null brews sometimes

This commit is contained in:
Scott Tolksdorf
2017-01-12 01:25:30 -05:00
parent 07f249b23e
commit 894e345a44
3 changed files with 7 additions and 9 deletions

View File

@@ -45,7 +45,11 @@ const APIActions = {
const Actions = {
init : (initState) => {
Store.init(initState);
const filteredState = _.reduce(initState, (r, val, key) => {
if(typeof val !== 'undefined') r[key] = val;
return r;
}, {});
Store.init(filteredState);
},
setBrew : (brew) => {
dispatch('SET_BREW', brew);