Skip to content
Snippets Groups Projects
Commit 91e2535b authored by Tom Robinson's avatar Tom Robinson
Browse files

Fix collection permissions canceling

parent 008728f8
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,11 @@ import {
getSaveError,
getDiff,
} from "../selectors";
import { updatePermission, savePermissions } from "../permissions";
import {
updatePermission,
savePermissions,
loadPermissions,
} from "../permissions";
import { goBack, push } from "react-router-redux";
const mapStateToProps = (state, props) => {
......@@ -30,7 +34,7 @@ const mapStateToProps = (state, props) => {
const mapDispatchToProps = {
onUpdatePermission: updatePermission,
onSave: savePermissions,
onCancel: () => (window.history.length > 1 ? goBack() : push("/questions")),
onCancel: loadPermissions,
onChangeTab: tab => push(`/admin/permissions/${tab}`),
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment