mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 00:46:03 +00:00
dropdown_widget: Use util.the for $events_container.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
7ce49a709e
commit
49c72f8a09
@@ -229,14 +229,7 @@ export class DropdownWidget {
|
|||||||
|
|
||||||
setup(): void {
|
setup(): void {
|
||||||
this.init();
|
this.init();
|
||||||
const delegate_container = this.$events_container.get(0);
|
const delegate_container = util.the(this.$events_container);
|
||||||
if (delegate_container === undefined) {
|
|
||||||
blueslip.error(
|
|
||||||
"Cannot initialize dropdown. `$events_container` empty.",
|
|
||||||
this.$events_container,
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.disable_for_spectators && page_params.is_spectator) {
|
if (this.disable_for_spectators && page_params.is_spectator) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user