Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
zjquery: Remove arg.selector special case.
Anders Kaseorgbb973f92d941
diff --git a/web/tests/lib/zjquery.cjs b/web/tests/lib/zjquery.cjsindex 63894383755..baed3c1525d 100644--- a/web/tests/lib/zjquery.cjs+++ b/web/tests/lib/zjquery.cjs@@ -85,14 +85,6 @@ function make_zjquery() {const zjquery = function (arg, arg2) {assert.ok(typeof arg !== "function", "zjquery does not support $(callback)");- // If somebody is passing us an element, we return- // the element itself if it's been created with- // zjquery.- // This may happen in cases like $(this).- if (arg.selector && elems.has(arg.selector)) {- return arg;- }-// We occasionally create stub objects that know// they want to be wrapped by jQuery (so they can// in turn return stubs). The convention is thatdiff --git a/web/tests/lib/zjquery_element.cjs b/web/tests/lib/zjquery_element.cjsindex 078abb2749f..ec29de78e27 100644--- a/web/tests/lib/zjquery_element.cjs+++ b/web/tests/lib/zjquery_element.cjs@@ -210,6 +210,10 @@ function FakeElement(selector, opts) {}return text;},+ // Used by zjquery to support $($x) === $x+ to_$() {+ return this;+ },toggle(show) {assert.ok([true, false].includes(show));shown = show;