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.

list_widget: Remove undefined from create's return type.

evykassirerd7cab7c1d4cc
diff --git a/web/src/list_widget.ts b/web/src/list_widget.ts
index 708e2ad6273..479f33d9e0e 100644
--- a/web/src/list_widget.ts
+++ b/web/src/list_widget.ts
@@ -254,7 +254,7 @@ export function create<Key, Item = Key>(
$container: JQuery,
list: Key[],
opts: ListWidgetOpts<Key, Item>,
-): ListWidget<Key, Item> | undefined {
+): ListWidget<Key, Item> {
if (opts.name && DEFAULTS.instances.get(opts.name)) {
// Clear event handlers for prior widget.
const old_widget = DEFAULTS.instances.get(opts.name)!;