From c1289cd6b17e6551f09ddbf0f9c3ad46ca717c47 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Tue, 14 Jul 2026 17:08:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(util):=20=E4=BC=98=E5=8C=96=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=8F=82=E6=95=B0=E7=9A=84=E7=A9=BA=E5=80=BC=E5=A4=84?= =?UTF-8?q?=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将原有的可选链空合并赋值改为条件式展开参数,避免传入无效的空值参数 --- common/js/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/js/util.js b/common/js/util.js index 0ffa1c5..8a31329 100644 --- a/common/js/util.js +++ b/common/js/util.js @@ -1452,8 +1452,8 @@ export default { const { wap_url, name, parent, type, appid, page, mobile, image, ...navParams } = link; this.redirectTo(link.wap_url, { ...navParams, - title: link?.title ?? '', - enable_set_title: link?.enable_set_title ? 1 : 0, + ...(link.title != null && { title: link.title }), + ...(link.enable_set_title != null && { enable_set_title: link.enable_set_title ? 1 : 0 }), ...(link.page_params || {}) }); }