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.

settings_components: Convert .data("setting-widget-type") to .attr.

Anders Kaseorg64c8262eafb2
diff --git a/web/src/settings_components.ts b/web/src/settings_components.ts
index b69bdc636b8..8ba73ce3d45 100644
--- a/web/src/settings_components.ts
+++ b/web/src/settings_components.ts
@@ -658,7 +658,9 @@ function get_input_type($input_elem: JQuery, input_type?: string): string {
if (input_type !== undefined && ["boolean", "string", "number"].includes(input_type)) {
return input_type;
}
- return $input_elem.data("setting-widget-type");
+ input_type = $input_elem.attr("data-setting-widget-type");
+ assert(input_type !== undefined);
+ return input_type;
}
export function get_input_element_value(