DEV: Drop impossible conditional from admin-logs-staff-action-logs ()

`Object.keys(filters)` will never return 0
This commit is contained in:
David Taylor 2023-03-16 12:27:27 +00:00 committed by GitHub
parent 5d46a16ca5
commit 9d1423b5aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 7 deletions
app/assets/javascripts/admin/addon/routes

View File

@ -36,12 +36,8 @@ export default class AdminLogsStaffActionLogsRoute extends DiscourseRoute {
@action
onFiltersChange(filters) {
if (filters && Object.keys(filters) === 0) {
this.transitionTo("adminLogs.staffActionLogs");
} else {
this.transitionTo("adminLogs.staffActionLogs", {
queryParams: { filters },
});
}
this.transitionTo("adminLogs.staffActionLogs", {
queryParams: { filters },
});
}
}