Skip to content

Commit 2cb2408

Browse files
committed
#602 fixing spinner issue
1 parent 5eb6865 commit 2cb2408

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

webapp/redux/middleware/middleware.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import {
2727
addInstancesToCanvas,
2828
openConfirmationDialog
2929
} from '../actions/general';
30-
import { OPEN_BACKEND_ERROR_DIALOG, openBackendErrorDialog } from '../actions/errors';
30+
import { OPEN_BACKEND_ERROR_DIALOG, CLOSE_BACKEND_ERROR_DIALOG, openBackendErrorDialog } from '../actions/errors';
3131
import { closeDrawerDialogBox } from '../actions/drawer';
3232
import Utils from '../../Utils';
3333
import { downloadJsonResponse, downloadPythonResponse } from './utils';
@@ -187,7 +187,6 @@ export default (store) => (next) => (action) => {
187187
switchLayoutAction(false, reset);
188188
getExperiments()
189189
next(action);
190-
191190
};
192191

193192
const pythonErrorCallback = (error) => {
@@ -341,10 +340,7 @@ export default (store) => (next) => (action) => {
341340
}
342341
case CREATE_NETWORK: {
343342
next(GeppettoActions.waitData('Instantiating the NetPyNE Model', GeppettoActions.layoutActions.SET_WIDGETS));
344-
345343
checkParametersThen(() => instantiateNetwork({}))
346-
347-
348344
break;
349345
}
350346
case CREATE_SIMULATE_NETWORK: {
@@ -492,6 +488,11 @@ export default (store) => (next) => (action) => {
492488
}, pythonErrorCallback);
493489
break;
494490
}
491+
case CLOSE_BACKEND_ERROR_DIALOG: {
492+
next(GeppettoActions.setWidgets(store.getState().widgets));
493+
next(action);
494+
break;
495+
}
495496
default: {
496497
next(action);
497498
}

0 commit comments

Comments
 (0)