mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
web: Use util.the for accessing element of single-item lists.
This commit is contained in:
@@ -363,11 +363,13 @@ export function restore_message(draft: LocalStorageDraft): ComposeArguments {
|
||||
|
||||
function draft_notify(): void {
|
||||
// Display a tooltip to notify the user about the saved draft.
|
||||
const instance = tippy.default(".top_left_drafts .unread_count", {
|
||||
content: $t({defaultMessage: "Saved as draft"}),
|
||||
arrow: true,
|
||||
placement: "right",
|
||||
})[0]!;
|
||||
const instance = util.the(
|
||||
tippy.default(".top_left_drafts .unread_count", {
|
||||
content: $t({defaultMessage: "Saved as draft"}),
|
||||
arrow: true,
|
||||
placement: "right",
|
||||
}),
|
||||
);
|
||||
instance.show();
|
||||
function remove_instance(): void {
|
||||
instance.destroy();
|
||||
|
||||
Reference in New Issue
Block a user