diff --git a/frameworks/ets/ets/@ohos.notificationManager.ets b/frameworks/ets/ets/@ohos.notificationManager.ets index 29c001dc874ddf4b88d38cd88aba6d1298fb1ea8..bc9a8dfa381ee5c461fe498acae8afd03385989a 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;