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

@@ -47,7 +47,7 @@ exports.get_group_typists = function (group) {
};
exports.get_all_typists = function () {
let typists = _.flatten([...typist_dct.values()], true);
let typists = _.flatten(Array.from(typist_dct.values()), true);
typists = util.sorted_ids(typists);
typists = _.uniq(typists, true);
return typists;