mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
Fixed theme warnings not passed when installing theme
refs 6593c3e4a6
In development mode, we didn't pass the warnings when installing a theme. So the warnings were not visible with the fatal errors.
This commit is contained in:
parent
f6e463ea43
commit
3ddc85781c
@ -124,7 +124,7 @@ export default class InstallThemeModal extends Component {
|
|||||||
|
|
||||||
this.fatalValidationErrors = fatalErrors;
|
this.fatalValidationErrors = fatalErrors;
|
||||||
this.validationErrors = normalErrors;
|
this.validationErrors = normalErrors;
|
||||||
|
this.validationWarnings = error.payload.errors[0].details.warnings || [];
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,6 +153,7 @@ export default class UploadThemeModal extends Component {
|
|||||||
|
|
||||||
this.fatalValidationErrors = fatalErrors;
|
this.fatalValidationErrors = fatalErrors;
|
||||||
this.validationErrors = normalErrors;
|
this.validationErrors = normalErrors;
|
||||||
|
this.validationWarnings = errorResponse.payload.errors[0].details.warnings || [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +143,8 @@ const getThemeValidationError = (message, themeName, checkedTheme) => {
|
|||||||
message: tpl(messages[message], {theme: themeName}),
|
message: tpl(messages[message], {theme: themeName}),
|
||||||
errorDetails: Object.assign(
|
errorDetails: Object.assign(
|
||||||
_.pick(checkedTheme, ['checkedVersion', 'name', 'path', 'version']), {
|
_.pick(checkedTheme, ['checkedVersion', 'name', 'path', 'version']), {
|
||||||
errors: checkedTheme.results.error
|
errors: checkedTheme.results.error,
|
||||||
|
warnings: checkedTheme.results.warning
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user