From 4cd8d70de56d511c04aba8f5ea27e6cd0bfba28e Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Wed, 15 Nov 2023 18:47:56 +0900 Subject: [PATCH] cleanup if/else --- .../incoming-transactions-graph.component.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts b/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts index f6d2de5df..10fe22067 100644 --- a/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts +++ b/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts @@ -256,13 +256,11 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges, On ], yAxis: { max: (value) => { - if (!this.outlierCappingEnabled) { + if (!this.outlierCappingEnabled || value.max < this.medianVbytesPerSecond * OUTLIERS_MEDIAN_MULTIPLIER) { return undefined; + } else { + return Math.round(this.medianVbytesPerSecond * OUTLIERS_MEDIAN_MULTIPLIER); } - if (value.max < this.medianVbytesPerSecond * OUTLIERS_MEDIAN_MULTIPLIER) { - return undefined; - } - return Math.round(this.medianVbytesPerSecond * OUTLIERS_MEDIAN_MULTIPLIER); }, type: 'value', axisLabel: {