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.

zjquery: Support $(...)[i] syntax.

Steve Howell7a3ba26c7825
diff --git a/frontend_tests/node_tests/buddy_list.js b/frontend_tests/node_tests/buddy_list.js
index 4dd1b517479..1b2fd435bb4 100644
--- a/frontend_tests/node_tests/buddy_list.js
+++ b/frontend_tests/node_tests/buddy_list.js
@@ -24,7 +24,7 @@ function init_simulated_scrolling() {
scrollHeight: 0,
};
- $("#buddy_list_wrapper")[0] = elem;
+ $.create("#buddy_list_wrapper", {children: [elem]});
$("#buddy_list_wrapper_padding").set_height(0);
diff --git a/frontend_tests/zjsunit/zjquery.js b/frontend_tests/zjsunit/zjquery.js
index e235ad4c5b4..0fce0c3d856 100644
--- a/frontend_tests/zjsunit/zjquery.js
+++ b/frontend_tests/zjsunit/zjquery.js
@@ -428,6 +428,11 @@ function make_new_elem(selector, opts) {
yield child;
}
};
+
+ for (const [i, child] of opts.children.entries()) {
+ self[i] = child;
+ }
+
self.length = opts.children.length;
}