web: Convert .data("search-results-empty") to .attr.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2024-05-02 17:29:50 -07:00
committed by Tim Abbott
parent ebea1eed18
commit 153847d617
6 changed files with 13 additions and 8 deletions

View File

@@ -291,8 +291,8 @@ export class BuddyList extends BuddyListConf {
}
}
$("#buddy-list-users-matching-view").data(
"search-results-empty",
$("#buddy-list-users-matching-view").attr(
"data-search-results-empty",
matching_view_empty_list_message,
);
if ($("#buddy-list-users-matching-view .empty-list-message").length) {
@@ -302,7 +302,10 @@ export class BuddyList extends BuddyListConf {
$("#buddy-list-users-matching-view").html(empty_list_widget_html);
}
$("#buddy-list-other-users").data("search-results-empty", other_users_empty_list_message);
$("#buddy-list-other-users").attr(
"data-search-results-empty",
other_users_empty_list_message,
);
if ($("#buddy-list-other-users .empty-list-message").length) {
const empty_list_widget_html = render_empty_list_widget_for_list({
other_users_empty_list_message,