Ghost/ghost/admin/app/serializers/theme.js
Kevin Ansfield 26d05aecd8
Fixed Theme.errors clash with Ember Data Model's errors property (#16106)
no issue

- the Ember Data `Model` class has an `errors` property by default that
is set to a `DS.Errors` instance but the Theme model was overriding that
with an `errors` attr
- it hasn't been an issue so far but causes problems in Ember/Ember Data
3.28.x because that tries to use the `DS.Errors` interface on the
overridden attr property which then throws errors because the `errors`
attr doesn't have the right methods
2023-02-28 13:28:32 +00:00

12 lines
253 B
JavaScript

import ApplicationSerializer from './application';
import classic from 'ember-classic-decorator';
@classic
export default class Theme extends ApplicationSerializer {
primaryKey = 'name';
attrs = {
gscanErrors: {key: 'errors'}
};
}