js: Replace [...x] with Array.from(x).

Babel strict generates more code for [...x] than you’d like, while
Babel loose mode assumes x is an array.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2020-02-04 14:46:56 -08:00
committed by Tim Abbott
parent 437961fba3
commit de3146c137
17 changed files with 51 additions and 51 deletions

View File

@@ -718,7 +718,7 @@ exports.filter_all_persons = function (pred) {
};
exports.get_realm_persons = function () {
return [...active_user_dict.values()];
return Array.from(active_user_dict.values());
};
exports.get_active_human_persons = function () {
@@ -730,7 +730,7 @@ exports.get_active_human_persons = function () {
exports.get_active_user_ids = function () {
// This includes active users and active bots.
return [...active_user_dict.keys()];
return Array.from(active_user_dict.keys());
};
exports.is_cross_realm_email = function (email) {