From 9919343a3faf9b8776d1e17f9b1a304bcf3f01b1 Mon Sep 17 00:00:00 2001 From: heguokai <275503077@qq.com> Date: Mon, 8 Sep 2025 18:42:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DTemplate=E4=B8=ADname?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E5=AD=97=E7=AC=A6=E6=97=B6=E6=8A=A5401?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: heguokai <275503077@qq.com> --- frameworks/ets/ets/@ohos.notificationManager.ets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frameworks/ets/ets/@ohos.notificationManager.ets b/frameworks/ets/ets/@ohos.notificationManager.ets index 342ec75b6..98717d333 100644 --- a/frameworks/ets/ets/@ohos.notificationManager.ets +++ b/frameworks/ets/ets/@ohos.notificationManager.ets @@ -501,10 +501,10 @@ export default namespace notificationManager { if (template === null) { return false; } - if (template?.name != undefined && template?.name?.trim() === '') { + if (template?.name == undefined) { return false; } - if (template?.data != undefined && template?.data === null) { + if (template?.data !== undefined && typeof template?.data !== 'object') { return false; } return true; -- Gitee