From 1036d7938ebf458a6ef0dd0ab89d3bc845b5e768 Mon Sep 17 00:00:00 2001 From: DCloud_UNI_BFC Date: Tue, 13 Aug 2024 11:30:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4promise=20=E5=8C=96?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/api/README.md | 4 ++++ docs/tutorial/migration-to-vue3.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/api/README.md b/docs/api/README.md index e3d43026d..1768e5a49 100644 --- a/docs/api/README.md +++ b/docs/api/README.md @@ -179,6 +179,10 @@ uni.addInterceptor({ } return new Promise((resolve, reject) => { res.then((res) => { + if (!res) { + resolve(res); + return; + } if (res[0]) { reject(res[0]); } else { diff --git a/docs/tutorial/migration-to-vue3.md b/docs/tutorial/migration-to-vue3.md index 4a9b681aa..ca141dc25 100644 --- a/docs/tutorial/migration-to-vue3.md +++ b/docs/tutorial/migration-to-vue3.md @@ -341,6 +341,10 @@ uni.addInterceptor({ } return new Promise((resolve, reject) => { res.then((res) => { + if (!res) { + resolve(res) + return; + } if (res[0]) { reject(res[0]); } else { -- GitLab