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.

eslint: Fix unicorn/prefer-spread.

Anders Kaseorg983a6b5e5118
diff --git a/web/tests/lib/markdown_assert.cjs b/web/tests/lib/markdown_assert.cjs
index 3e4a7a66756..1d80800d27d 100644
--- a/web/tests/lib/markdown_assert.cjs
+++ b/web/tests/lib/markdown_assert.cjs
@@ -71,11 +71,7 @@ class MarkdownComparer {
_reorderAttributes(node) {
// Sorts every attribute in every element by name. Ensures consistent diff HTML output
- const attributeList = [];
-
- for (const attr of node.attributes) {
- attributeList.push(attr);
- }
+ const attributeList = [...node.attributes];
// If put in above forEach loop, causes issues (possible nodes.attribute invalidation?)
for (const attr of attributeList) {