refactor: 可読性のため一部でArray.prototype.at
を使うように (#11274)
* refactor: `Array.prototype.at`を使うように * fixup! refactor: `Array.prototype.at`を使うように
This commit is contained in:
parent
c0dbc3b53f
commit
2b6dbd4fcb
19 changed files with 46 additions and 44 deletions
|
@ -59,8 +59,8 @@ function draw(): void {
|
|||
|
||||
polygonPoints = `0,${ viewBoxY } ${ polylinePoints } ${ viewBoxX },${ viewBoxY }`;
|
||||
|
||||
headX = _polylinePoints[_polylinePoints.length - 1][0];
|
||||
headY = _polylinePoints[_polylinePoints.length - 1][1];
|
||||
headX = _polylinePoints.at(-1)![0];
|
||||
headY = _polylinePoints.at(-1)![1];
|
||||
}
|
||||
|
||||
watch(() => props.src, draw, { immediate: true });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue