From ab1be4067e3726c2f2791861aec7ec3da3ffd493 Mon Sep 17 00:00:00 2001 From: Ludek <13610612+ludeknovy@users.noreply.github.com> Date: Tue, 9 Mar 2021 22:38:44 +0100 Subject: [PATCH] sort fix for performance analysis (#109) --- src/app/item-detail/item-detail.component.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/item-detail/item-detail.component.ts b/src/app/item-detail/item-detail.component.ts index 6f2c5384..e499937b 100644 --- a/src/app/item-detail/item-detail.component.ts +++ b/src/app/item-detail/item-detail.component.ts @@ -272,10 +272,8 @@ export class ItemDetailComponent implements OnInit { }); }); - const variabilitySorted = output.sort((a, b) => b.variablity - a.variablity); - const onePercSorted = output.sort((a, b) => b.onePerc - a.onePerc); - - + const variabilitySorted = [...output].sort((a, b) => b.variability - a.variability); + const onePercSorted = [...output].sort((a, b) => b.onePerc - a.onePerc); this.perfAnalysis = { variability: {