From b4bdd7ed675f1b67dad34850b05f3ea0a5003956 Mon Sep 17 00:00:00 2001 From: Bing Sun Date: Sun, 26 Apr 2020 10:22:51 +0800 Subject: [PATCH] make_model: selects should not be set to [] --- src/util/make_model.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/make_model.js b/src/util/make_model.js index 7599d1d..b9ea798 100644 --- a/src/util/make_model.js +++ b/src/util/make_model.js @@ -30,7 +30,7 @@ export default (options={}) => { endpoint: options.endpoint, endpoint_type: options.endpoint.startsWith('/rpc') ? 'function' : 'relation', // query part - selects: options.selects || [], + selects: options.selects } // private model cache & meta-info @@ -105,7 +105,7 @@ export default (options={}) => { // fill the data cache response.forEach((data, i) => { // process values - _configs.selects + _configs.selects && _configs.selects .filter(select => select.processor) .forEach(select => data[select.alias || select.label] = select.processor(data[select.alias || select.label]))