mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 03:11:54 +00:00
Add error handling in watch_manual_resize().
We now explicitly complain if a caller passes in a bad selector to this function and return undefined.
This commit is contained in:
@@ -167,8 +167,15 @@ function left_userlist_get_new_heights() {
|
||||
|
||||
exports.watch_manual_resize = function (element) {
|
||||
return (function on_box_resize(cb) {
|
||||
var box = document.querySelector(element);
|
||||
|
||||
if (!box) {
|
||||
blueslip.error('Bad selector in watch_manual_resize: ' + element);
|
||||
return;
|
||||
}
|
||||
|
||||
var meta = {
|
||||
box: document.querySelector(element),
|
||||
box: box,
|
||||
height: null,
|
||||
mousedown: false,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user