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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user