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

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-05-02 17:16:02 -07:00 committed by Tim Abbott
parent abee323c77
commit 64c8262eaf
1 changed files with 3 additions and 1 deletions

View File

@ -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)) { if (input_type !== undefined && ["boolean", "string", "number"].includes(input_type)) {
return 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( export function get_input_element_value(