Skip to content

Commit

Permalink
fix(admin): handle irregular plural deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
HEYGUL committed Jul 15, 2024
1 parent 8fa9d5a commit 949e9e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion admin/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module.exports = function (defaults) {
staticModifiers: true,
packagerOptions: {
webpackConfig: {
devtool: sourceMapConfig[process.env.CI ? 'test' : process.env.NODE_ENV ?? 'default'],
devtool: sourceMapConfig[process.env.CI ? 'test' : (process.env.NODE_ENV ?? 'default')],
},
},
});
Expand Down
5 changes: 3 additions & 2 deletions admin/mirage/serializers/application.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import Inflector from 'ember-inflector';
import { irregular, pluralize } from '@ember-data/request-utils/string';
import { JSONAPISerializer } from 'miragejs';

export default JSONAPISerializer.extend({
typeKeyForModel(model) {
return Inflector.inflector.pluralize(model.modelName);
irregular('badge-criterion', 'badge-criteria');
return pluralize(model.modelName);
},
});

0 comments on commit 949e9e3

Please sign in to comment.