After saving slice fixing redirect (#3572)

This commit is contained in:
michellethomas
2017-10-02 18:19:52 -07:00
committed by Maxime Beauchemin
parent f8cc05b54e
commit 064363df78
2 changed files with 16 additions and 10 deletions

View File

@@ -108,7 +108,11 @@ class SaveModal extends React.Component {
this.props.actions.saveSlice(saveUrl)
.then((data) => {
// Go to new slice url or dashboard url
window.location = data.slice.slice_url;
if (gotodash) {
window.location = data.dashboard;
} else {
window.location = data.slice.slice_url;
}
});
this.props.onHide();
}