diff --git a/services/dialog_ui/enable_notification_dialog/entry/src/main/ets/pages/notificationDialog.ets b/services/dialog_ui/enable_notification_dialog/entry/src/main/ets/pages/notificationDialog.ets index 19def926dcc080302fe27f298718161f060e79e4..dcdda5936931e4a6f587755be9f477e81be4310c 100644 --- a/services/dialog_ui/enable_notification_dialog/entry/src/main/ets/pages/notificationDialog.ets +++ b/services/dialog_ui/enable_notification_dialog/entry/src/main/ets/pages/notificationDialog.ets @@ -236,7 +236,7 @@ struct PermissionDialog { try { await this.dialog?.publishButtonClickedEvent(enabled); } catch (err) { - console.error(TAG, `NotificationDialog enable error, code is ${err.code}`); + console.error(TAG, `NotificationDialog enable error, code is ${err?.code}`); } finally { await this.dialog?.destroy(); }