mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
Fixed logic for checking theme compatibility with @page properties (#17451)
no issue - logic was incorrect in two places that meant we were showing the incompatibility warning for compatible themes - `codedErrors` was looking at the Ember Data `errors` object instead of the renamed `gscanErrors` object
This commit is contained in:
parent
81e91e1c7a
commit
0b6c2e3421
@ -165,7 +165,7 @@ export default class GhPostSettingsMenu extends Component {
|
||||
}
|
||||
|
||||
get themeMissingShowTitleAndFeatureImage() {
|
||||
return this.themeManagement.activeTheme.hasPageBuilderFeature('show_title_and_feature_image');
|
||||
return !this.themeManagement.activeTheme.hasPageBuilderFeature('show_title_and_feature_image');
|
||||
}
|
||||
|
||||
willDestroyElement() {
|
||||
|
@ -40,10 +40,10 @@ export default Model.extend({
|
||||
return codedWarnings;
|
||||
}),
|
||||
|
||||
codedErrors: computed('errors.[]', function () {
|
||||
codedErrors: computed('gscanErrors.[]', function () {
|
||||
const codedErrors = {};
|
||||
|
||||
this.errors.forEach((error) => {
|
||||
this.gscanErrors.forEach((error) => {
|
||||
if (!codedErrors[error.code]) {
|
||||
codedErrors[error.code] = [];
|
||||
}
|
||||
@ -82,7 +82,7 @@ export default Model.extend({
|
||||
}
|
||||
|
||||
return !failures['GS110-NO-MISSING-PAGE-BUILDER-USAGE'].some((failure) => {
|
||||
return !failure.failures.some(({ref}) => ref === `@page.${feature}`);
|
||||
return failure.failures.some(({ref}) => ref === `@page.${feature}`);
|
||||
});
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user