mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:47:22 +08:00
Fix failing qunit test.
This commit is contained in:
parent
100ad15e18
commit
6cd42629e1
|
@ -461,6 +461,16 @@ export default function() {
|
|||
email: "<small>discobot_email</small>"
|
||||
}
|
||||
];
|
||||
|
||||
const showEmails = request.queryParams.show_emails;
|
||||
|
||||
if (showEmails === "false") {
|
||||
store = store.map(item => {
|
||||
delete item.email;
|
||||
return item;
|
||||
});
|
||||
}
|
||||
|
||||
const ascending = request.queryParams.ascending;
|
||||
const order = request.queryParams.order;
|
||||
|
||||
|
@ -469,6 +479,7 @@ export default function() {
|
|||
return a[order] - b[order];
|
||||
});
|
||||
}
|
||||
|
||||
if (ascending) {
|
||||
store = store.reverse();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user