diff --git a/frameworks/ets/ets/@ohos.notificationManager.ets b/frameworks/ets/ets/@ohos.notificationManager.ets index 342ec75b6f6bbbe86c00fc2cc75e00473fa05589..98717d333da820b2e8076b835f2eceeff93033fe 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;