From 52cc71e12b0b9fa173216bef173005ecbb7825cb Mon Sep 17 00:00:00 2001 From: mertsincan Date: Tue, 24 Aug 2021 16:56:37 +0300 Subject: [PATCH] Refactor #1467 --- src/components/datatable/DataTable.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/datatable/DataTable.vue b/src/components/datatable/DataTable.vue index 505e19c35..5ca1bb344 100755 --- a/src/components/datatable/DataTable.vue +++ b/src/components/datatable/DataTable.vue @@ -1813,7 +1813,7 @@ export default { }, allRowsSelected() { const val = this.frozenValue ? [...this.frozenValue, ...this.processedData]: this.processedData; - const length = this.lazy ? this.totalRecords : val?.length; + const length = this.lazy ? this.totalRecords : (val ? val.length : 0); return (val && length > 0 && this.selection && this.selection.length > 0 && this.selection.length === length); }, attributeSelector() {