From fd80bada977bff90b085daa29fc940663d6c011f Mon Sep 17 00:00:00 2001 From: roymondchen Date: Fri, 13 Sep 2024 14:56:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(data-source):=20manager=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E6=95=B0=E6=8D=AE=E6=BA=90=E6=97=B6=EF=BC=8C=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E5=A4=B1=E8=B4=A5=E4=BA=86=E8=A6=81=E6=8A=8Adata?= =?UTF-8?q?=E4=B8=AD=E5=AF=B9=E5=BA=94=E7=9A=84=E6=95=B0=E6=8D=AE=E5=88=A0?= =?UTF-8?q?=E6=8E=89=EF=BC=8C=E4=B8=8D=E7=84=B6=E5=9C=A8ssr=E4=B8=AD?= =?UTF-8?q?=E4=BC=9A=E5=AF=BC=E8=87=B4=E5=AE=A2=E6=88=B7=E7=AB=AF=E4=B8=8D?= =?UTF-8?q?=E4=BC=9A=E9=87=8D=E6=96=B0=E5=B0=9D=E8=AF=95=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/data-source/src/DataSourceManager.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/data-source/src/DataSourceManager.ts b/packages/data-source/src/DataSourceManager.ts index 1f4457c83..44ec650a1 100644 --- a/packages/data-source/src/DataSourceManager.ts +++ b/packages/data-source/src/DataSourceManager.ts @@ -76,8 +76,13 @@ class DataSourceManager extends EventEmitter { values.forEach((value, index) => { const dsId = dataSourceList[index][0]; if (value.status === 'fulfilled') { - data[dsId] = this.data[dsId]; + if (this.data[dsId]) { + data[dsId] = this.data[dsId]; + } else { + delete data[dsId]; + } } else if (value.status === 'rejected') { + delete data[dsId]; errors[dsId] = value.reason; } });