From 87702bfab8f40861a069ceced94e77d5d98b3c68 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Wed, 5 Jul 2023 11:04:15 +0900 Subject: [PATCH] =?UTF-8?q?setData,=20addData=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/resources/js/base/dataset.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/resources/js/base/dataset.js b/src/main/webapp/resources/js/base/dataset.js index 9ec9861a..26d8ea95 100644 --- a/src/main/webapp/resources/js/base/dataset.js +++ b/src/main/webapp/resources/js/base/dataset.js @@ -475,7 +475,7 @@ class Dataset { this._byKeys = {}; this._current = null; - let data = this._getDataItems(obj); + let data = this._getDataItems(obj = obj || {}); this._items = data.items; this._byKeys = data.byKeys; /* @@ -498,7 +498,6 @@ class Dataset { } _getDataItems(obj) { - obj = obj || {}; let array = Array.isArray(obj) ? obj : this.conf.dataGetter(obj) || []; if (!Array.isArray(array)) throw new Error("The data must be an array"); @@ -533,7 +532,7 @@ class Dataset { return this.setData(obj); let state = this.state; - let data = this._getDataItems(obj); + let data = this._getDataItems(obj = obj || {}); this._items = this._items.concat(data.items); this._byKeys = { ...this._byKeys,