mirror of
https://github.com/strapi/strapi.git
synced 2025-10-13 09:03:25 +00:00
Merge pull request #3290 from strapi/fix/error-track
Fix missing history in saga
This commit is contained in:
commit
0997ca0801
@ -71,7 +71,7 @@ export function* submitCT({
|
|||||||
oldContentTypeName,
|
oldContentTypeName,
|
||||||
body,
|
body,
|
||||||
source,
|
source,
|
||||||
context: { emitEvent, plugins, router, updatePlugin },
|
context: { emitEvent, plugins, history, updatePlugin },
|
||||||
}) {
|
}) {
|
||||||
try {
|
try {
|
||||||
const requestURL = `/${pluginId}/models/${oldContentTypeName}`;
|
const requestURL = `/${pluginId}/models/${oldContentTypeName}`;
|
||||||
@ -88,7 +88,7 @@ export function* submitCT({
|
|||||||
yield call(request, requestURL, opts, true);
|
yield call(request, requestURL, opts, true);
|
||||||
emitEvent('didSaveContentType');
|
emitEvent('didSaveContentType');
|
||||||
yield put(submitContentTypeSucceeded());
|
yield put(submitContentTypeSucceeded());
|
||||||
router.history.push(`/plugins/${pluginId}/models/${name}`);
|
history.push(`/plugins/${pluginId}/models/${name}`);
|
||||||
|
|
||||||
if (name !== oldContentTypeName) {
|
if (name !== oldContentTypeName) {
|
||||||
emitEvent('didEditNameOfContentType');
|
emitEvent('didEditNameOfContentType');
|
||||||
|
@ -207,7 +207,9 @@ export class ModelPage extends React.Component {
|
|||||||
submitContentType(
|
submitContentType(
|
||||||
this.getModelName(),
|
this.getModelName(),
|
||||||
get(modifiedData, this.getModelName()),
|
get(modifiedData, this.getModelName()),
|
||||||
this.context,
|
Object.assign(this.context, {
|
||||||
|
history: this.props.history,
|
||||||
|
}),
|
||||||
this.getSource(),
|
this.getSource(),
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user