refactor: 可読性のため一部でArray.prototype.at
を使うように (#11274)
* refactor: `Array.prototype.at`を使うように * fixup! refactor: `Array.prototype.at`を使うように
This commit is contained in:
@@ -94,10 +94,10 @@ function onStats(connStats) {
|
||||
inPolygonPoints = `${viewBoxX - (stats.length - 1)},${viewBoxY} ${inPolylinePoints} ${viewBoxX},${viewBoxY}`;
|
||||
outPolygonPoints = `${viewBoxX - (stats.length - 1)},${viewBoxY} ${outPolylinePoints} ${viewBoxX},${viewBoxY}`;
|
||||
|
||||
inHeadX = inPolylinePointsStats[inPolylinePointsStats.length - 1][0];
|
||||
inHeadY = inPolylinePointsStats[inPolylinePointsStats.length - 1][1];
|
||||
outHeadX = outPolylinePointsStats[outPolylinePointsStats.length - 1][0];
|
||||
outHeadY = outPolylinePointsStats[outPolylinePointsStats.length - 1][1];
|
||||
inHeadX = inPolylinePointsStats.at(-1)![0];
|
||||
inHeadY = inPolylinePointsStats.at(-1)![1];
|
||||
outHeadX = outPolylinePointsStats.at(-1)![0];
|
||||
outHeadY = outPolylinePointsStats.at(-1)![1];
|
||||
|
||||
inRecent = connStats.net.rx;
|
||||
outRecent = connStats.net.tx;
|
||||
|
Reference in New Issue
Block a user