diff --git a/docs/api/README.md b/docs/api/README.md index e3d43026dc5fc3ff54a7e6a088a0d9b637a0851e..1768e5a49e6e8d3dd27f2dcc885e95f0299a5bb7 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 4a9b681aa0a876d2d53988ad87e4bf8ff526d2c1..ca141dc257ad553046a113ecf4ca30de4a3122fe 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 {