Skip to content

Commit 9d0b9d9

Browse files
committed
fix drawer list when switching from edit to model view
1 parent a393ace commit 9d0b9d9

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

webapp/redux/middleware/middleware.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,11 @@ export default (store) => (next) => (action) => {
115115
network: undefined,
116116
};
117117
}
118+
// TO FIX: I am not sure the one below is to fix, previously we were setting layout or widgets but I don't understand
119+
// how the widgets where making it back into the redux store without the set widgets
118120
return next(edit
119-
? previousLayout.edit ? GeppettoActions.setLayout(previousLayout.edit) : GeppettoActions.setWidgets({ ...Constants.EDIT_WIDGETS })
120-
: previousLayout.network ? GeppettoActions.setLayout(previousLayout.network) : GeppettoActions.setWidgets({ ...Constants.DEFAULT_NETWORK_WIDGETS }));
121+
? GeppettoActions.setLayout(previousLayout.edit) && GeppettoActions.setWidgets({ ...Constants.EDIT_WIDGETS })
122+
: GeppettoActions.setLayout(previousLayout.network) && GeppettoActions.setWidgets({ ...Constants.DEFAULT_NETWORK_WIDGETS }));
121123
};
122124

123125
const toNetworkCallback = (reset) => () => {

0 commit comments

Comments
 (0)