Sanity-check decaffeinate app.collections.Types

pull/1441/head
Simon Legner 1 year ago
parent 6f5beacfc4
commit 262a0b9d56

@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS104: Avoid inline assignments
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
app.collections.Types = class Types extends app.Collection { app.collections.Types = class Types extends app.Collection {
static model = "Type"; static model = "Type";
static GUIDES_RGX = static GUIDES_RGX =
@ -14,8 +7,9 @@ app.collections.Types = class Types extends app.Collection {
groups() { groups() {
const result = []; const result = [];
for (var type of this.models) { for (var type of this.models) {
var name; const name = this._groupFor(type);
(result[(name = this._groupFor(type))] || (result[name] = [])).push(type); result[name] ||= [];
result[name].push(type);
} }
return result.filter((e) => e.length > 0); return result.filter((e) => e.length > 0);
} }

Loading…
Cancel
Save