From ff9216b621aaef0a8203386fa1c3ca5477a2edea Mon Sep 17 00:00:00 2001 From: Soybean <2570172956@qq.com> Date: Tue, 30 Nov 2021 14:04:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(projects):=20=E4=BF=AE=E5=A4=8D=E7=BD=91?= =?UTF-8?q?=E7=BB=9C=E8=AF=B7=E6=B1=82=E9=94=99=E8=AF=AF=E7=A9=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/service/msg.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/service/msg.ts b/src/utils/service/msg.ts index 8473c798..e42eca64 100644 --- a/src/utils/service/msg.ts +++ b/src/utils/service/msg.ts @@ -22,7 +22,9 @@ export function showErrorMsg(error: RequestServiceError) { if (!NO_ERROR_MSG_CODE.includes(error.code)) { if (!hasErrorMsg(error)) { addErrorMsg(error); - window.$message?.error(error.msg, { duration: ERROR_MSG_DURATION }); + if (error.msg) { + window.$message?.error(error.msg, { duration: ERROR_MSG_DURATION }); + } setTimeout(() => { removeErrorMsg(error); }, ERROR_MSG_DURATION);