HomePhabricator
Diffusion Comm 26d131fd1804

[lib] [web] Use `slice(0, -1)` instead of `slice(0, ...length - 1)`

Description

[lib] [web] Use slice(0, -1) instead of slice(0, ...length - 1)

Summary: Noticed some instances of slice() being called with the length property of the array that was being sliced instead of the more concise syntax using negative indices.

Test Plan: N/A, but checked to make sure slice() functions the same with the negative index and when called with its positive counterpart (...length - 1, for example).

Reviewers: atul, palys-swm

Reviewed By: atul

Subscribers: ashoat, Adrian

Differential Revision: https://phab.comm.dev/D4316

Details

Provenance
aboshAuthored on Jun 21 2022, 11:45 AM
Reviewer
atul
Differential Revision
D4316: [lib] [web] Use `slice(0, -1)` instead of `slice(0, ...length - 1)`
Parents
rCOMM2a1d80ed6fa0: [web] Finish styling `ColorSelector` on iOS and Android
Branches
Unknown
Tags
Unknown