js: Use ES6 object literal shorthand syntax.

Generated by ESLint.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-07-20 13:18:43 -07:00
parent b2745f6e41
commit 96dcc0ce6e
189 changed files with 1328 additions and 1326 deletions

View File

@@ -37,9 +37,9 @@ exports.do_settings_change = function (request_method, url, data, status_element
}
request_method({
url: url,
data: data,
success: function (reponse_data) {
url,
data,
success(reponse_data) {
setTimeout(() => {
ui_report.success(success_msg, spinner, remove_after);
exports.display_checkmark(spinner);
@@ -52,7 +52,7 @@ exports.do_settings_change = function (request_method, url, data, status_element
}
}
},
error: function (xhr) {
error(xhr) {
if (opts !== undefined && opts.error_msg_element) {
loading.destroy_indicator(spinner);
ui_report.error(exports.strings.failure, xhr, opts.error_msg_element);