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

@@ -44,7 +44,7 @@ exports.poll_data_holder = function (is_my_poll, question, options) {
const options = [];
for (const [key, obj] of key_to_option) {
const voters = [...obj.votes.keys()];
const voters = Array.from(obj.votes.keys());
const current_user_vote = _.contains(voters, me);
options.push({