mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 01:47:41 +00:00
js: Simplify indexing arrays from the end with Array#at.
https://github.com/tc39/proposal-relative-indexing-method Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
0b03628324
commit
c6b372b471
@@ -242,7 +242,7 @@ export function setup_upload(config) {
|
||||
return;
|
||||
}
|
||||
const split_uri = uri.split("/");
|
||||
const filename = split_uri[split_uri.length - 1];
|
||||
const filename = split_uri.at(-1);
|
||||
if (config.mode === "compose" && !compose_state.composing()) {
|
||||
compose_actions.start("stream");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user