From 66d076142138da2051d08c745bed241ffcee3d12 Mon Sep 17 00:00:00 2001 From: Cleopatra Enjeck M Date: Mon, 2 Sep 2024 14:51:42 +0100 Subject: [PATCH] fix: check sorting array is non-empty Signed-off-by: Cleopatra Enjeck M --- src/shared/components/ncTable/mixins/columnClass.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/components/ncTable/mixins/columnClass.js b/src/shared/components/ncTable/mixins/columnClass.js index 87e03142d..19a998c67 100644 --- a/src/shared/components/ncTable/mixins/columnClass.js +++ b/src/shared/components/ncTable/mixins/columnClass.js @@ -28,6 +28,9 @@ export class AbstractColumn { } getNextSortsResult(nextSorts, rowA, rowB) { + if (!nextSorts) { + return 0 + } for (const sort of nextSorts) { const result = sort(rowA, rowB) if (result !== 0) {