We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
crates_cnt
1 parent 24cf819 commit 0a72e74Copy full SHA for 0a72e74
mirage/serializers/category.js
@@ -19,6 +19,6 @@ export default BaseSerializer.extend({
19
let allCrates = this.schema.crates.all();
20
let associatedCrates = allCrates.filter(it => it.categoryIds.includes(hash.id));
21
22
- hash.crates_cnt = associatedCrates.length;
+ hash.crates_cnt ??= associatedCrates.length;
23
},
24
});
mirage/serializers/keyword.js
let associatedCrates = allCrates.filter(it => it.keywordIds.includes(hash.id));
0 commit comments