mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 10:01:11 +08:00
DEV: Fix array-related linting issues in templates (#22935)
and remove more linting exemptions
This commit is contained in:
@ -11,11 +11,18 @@ export default class AdminUserFieldsController extends Controller {
|
||||
@service dialog;
|
||||
|
||||
fieldTypes = null;
|
||||
fieldSortOrder = ["position"];
|
||||
|
||||
@gte("model.length", MAX_FIELDS) createDisabled;
|
||||
@sort("model", "fieldSortOrder") sortedFields;
|
||||
|
||||
fieldSortOrder = ["position"];
|
||||
get firstField() {
|
||||
return this.sortedFields[0];
|
||||
}
|
||||
|
||||
get lastField() {
|
||||
return this.sortedFields[this.sortedFields.length - 1];
|
||||
}
|
||||
|
||||
@action
|
||||
createField() {
|
||||
|
Reference in New Issue
Block a user