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.

bootstrap_typeahead: Make `Typeahead.hide()` idempotent.

Pratik Chandacf1d3734354d
diff --git a/web/src/bootstrap_typeahead.ts b/web/src/bootstrap_typeahead.ts
index dd4ca1771bc..8b1229b8810 100644
--- a/web/src/bootstrap_typeahead.ts
+++ b/web/src/bootstrap_typeahead.ts
@@ -516,6 +516,9 @@ export class Typeahead<ItemType extends string | object> {
}
hide(): this {
+ if (!this.shown) {
+ return this;
+ }
this.shown = false;
if (this.non_tippy_parent_element) {
this.$container.hide();