Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

javascript_examples: Fix unicorn/no-useless-spread.

Anders Kaseorg8a96c687803b
diff --git a/zerver/openapi/javascript_examples.js b/zerver/openapi/javascript_examples.js
index 182499a6099..5db423b9e0a 100644
--- a/zerver/openapi/javascript_examples.js
+++ b/zerver/openapi/javascript_examples.js
@@ -301,9 +301,9 @@ add_example(
add_example("update_message_flags", "/messages/flags:post", 200, async (client, console) => {
// Send 3 messages to run this example on
- const message_ids = [...Array.from({length: 3})];
- for (let i = 0; i < message_ids.length; i = i + 1) {
- message_ids[i] = await send_test_message(client);
+ const message_ids = [];
+ for (let i = 0; i < 3; i += 1) {
+ message_ids.push(await send_test_message(client));
}
// {code_example|start}