From 18964c034604622e9b3b1b9981658e7a059b0235 Mon Sep 17 00:00:00 2001 From: prssanna Date: Sat, 29 Feb 2020 15:56:36 +0530 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20set=20content=20of=20empt?= =?UTF-8?q?y=20cell=20to=20empty=20string=20for=20sorting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/datamanager.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/datamanager.js b/src/datamanager.js index c0899c4..4f7fdcd 100644 --- a/src/datamanager.js +++ b/src/datamanager.js @@ -280,8 +280,11 @@ export default class DataManager { this.rowViewOrder.sort((a, b) => { const aIndex = a; const bIndex = b; - const aContent = this.getCell(colIndex, a).content; - const bContent = this.getCell(colIndex, b).content; + + let aContent = this.getCell(colIndex, a).content; + let bContent = this.getCell(colIndex, b).content; + aContent = aContent == null ? '' : aContent; + bContent = bContent == null ? '' : bContent; if (sortOrder === 'none') { return aIndex - bIndex;