mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
ui_report: Reuse channel.xhr_error_message function in error method.
We should reuse the `channel.xhr_error_message` in `ui_report` to reduce code duplication. Also, I changed the type of `message` parameter to `string` instead of `string | null` so that we do not need to alter the types of the functions that depends on the return value of `xhr_error_message`.
This commit is contained in:
committed by
Tim Abbott
parent
2e07c03968
commit
cfe2ddb091
@@ -1032,7 +1032,7 @@ export function save_message_row_edit($row) {
|
||||
}
|
||||
|
||||
hide_message_edit_spinner($row);
|
||||
const message = channel.xhr_error_message(null, xhr);
|
||||
const message = channel.xhr_error_message("", xhr);
|
||||
const $container = compose_banner.get_compose_banner_container(
|
||||
$row.find("textarea"),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user