mirror of
https://github.com/strapi/strapi.git
synced 2025-10-13 00:52:54 +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,
|
||||
body,
|
||||
source,
|
||||
context: { emitEvent, plugins, router, updatePlugin },
|
||||
context: { emitEvent, plugins, history, updatePlugin },
|
||||
}) {
|
||||
try {
|
||||
const requestURL = `/${pluginId}/models/${oldContentTypeName}`;
|
||||
@ -88,7 +88,7 @@ export function* submitCT({
|
||||
yield call(request, requestURL, opts, true);
|
||||
emitEvent('didSaveContentType');
|
||||
yield put(submitContentTypeSucceeded());
|
||||
router.history.push(`/plugins/${pluginId}/models/${name}`);
|
||||
history.push(`/plugins/${pluginId}/models/${name}`);
|
||||
|
||||
if (name !== oldContentTypeName) {
|
||||
emitEvent('didEditNameOfContentType');
|
||||
|
@ -207,7 +207,9 @@ export class ModelPage extends React.Component {
|
||||
submitContentType(
|
||||
this.getModelName(),
|
||||
get(modifiedData, this.getModelName()),
|
||||
this.context,
|
||||
Object.assign(this.context, {
|
||||
history: this.props.history,
|
||||
}),
|
||||
this.getSource(),
|
||||
);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user