mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
setup: Fix wildly unsafe cast in $.fn.expectOne.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
affdffdda5
commit
55e4be0939
@@ -26,10 +26,10 @@ $(() => {
|
||||
return this[0].getBoundingClientRect();
|
||||
};
|
||||
|
||||
$.fn.expectOne = function <T>() {
|
||||
$.fn.expectOne = function () {
|
||||
if (blueslip && this.length !== 1) {
|
||||
blueslip.error("Expected one element in jQuery set", {length: this.length});
|
||||
}
|
||||
return this as JQuery<T>;
|
||||
return this;
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user