mirror of https://github.com/zulip/zulip.git
eslint: Fix unicorn/prefer-at.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
54f90e41c0
commit
ea28083ba4
|
@ -720,7 +720,7 @@ export function get_search_result(base_query, query) {
|
||||||
const search_operators = Filter.parse(query);
|
const search_operators = Filter.parse(query);
|
||||||
let last = {operator: "", operand: "", negated: false};
|
let last = {operator: "", operand: "", negated: false};
|
||||||
if (search_operators.length > 0) {
|
if (search_operators.length > 0) {
|
||||||
last = search_operators.slice(-1)[0];
|
last = search_operators.at(-1);
|
||||||
} else if (page_params.search_pills_enabled) {
|
} else if (page_params.search_pills_enabled) {
|
||||||
// We push an empty term so that we can get suggestions
|
// We push an empty term so that we can get suggestions
|
||||||
// on the empty string based on the base query which is
|
// on the empty string based on the base query which is
|
||||||
|
|
|
@ -182,7 +182,7 @@ function get_value_for_new_option(container) {
|
||||||
existing_option_values.push(Number.parseInt($(this).attr("data-value"), 10));
|
existing_option_values.push(Number.parseInt($(this).attr("data-value"), 10));
|
||||||
});
|
});
|
||||||
existing_option_values.sort();
|
existing_option_values.sort();
|
||||||
return existing_option_values[existing_option_values.length - 1] + 1;
|
return existing_option_values.at(-1) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_choice_row(container) {
|
function create_choice_row(container) {
|
||||||
|
|
|
@ -344,7 +344,7 @@ export function setup_upload(config) {
|
||||||
// TODO: Ideally, we'd be using the `.error()` hook or
|
// TODO: Ideally, we'd be using the `.error()` hook or
|
||||||
// something, not parsing error message strings.
|
// something, not parsing error message strings.
|
||||||
const infoList = uppy.getState().info;
|
const infoList = uppy.getState().info;
|
||||||
const info = infoList[infoList.length - 1];
|
const info = infoList.at(-1);
|
||||||
if (info.type === "error" && info.message === "No Internet connection") {
|
if (info.type === "error" && info.message === "No Internet connection") {
|
||||||
// server_events already handles the case of no internet.
|
// server_events already handles the case of no internet.
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue