From f45515d9672c1b8a33e5e01c97f70d0b7b45b4a1 Mon Sep 17 00:00:00 2001 From: Sofie Hofmann <29145005+sofie29@users.noreply.github.com> Date: Mon, 15 Feb 2021 16:03:05 +0100 Subject: [PATCH] TSK-1560: TSK-1558: Fix error when displaying distribution targets --- web/src/app/shared/pipes/order-by.pipe.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/app/shared/pipes/order-by.pipe.ts b/web/src/app/shared/pipes/order-by.pipe.ts index c79bfc50c..bb64f1e9c 100644 --- a/web/src/app/shared/pipes/order-by.pipe.ts +++ b/web/src/app/shared/pipes/order-by.pipe.ts @@ -11,8 +11,8 @@ export class OrderBy implements PipeTransform { direction = -1; sortKey = sortKey.substr(1); } - const objectA = a[sortKey].toLowerCase(); - const objectB = b[sortKey].toLowerCase(); + const objectA = a[sortKey] ? a[sortKey].toLowerCase() : ''; + const objectB = b[sortKey] ? b[sortKey].toLowerCase() : ''; if (objectA < objectB) { return -1 * direction; }