From c80e0ab3588fa194efe1113cc71fe6a37e4ad8e7 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 13 Jan 2025 10:42:50 +0300 Subject: [PATCH] Refactor #7053 --- packages/primevue/src/toast/ToastMessage.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/primevue/src/toast/ToastMessage.vue b/packages/primevue/src/toast/ToastMessage.vue index e3621fe8b..cda2413b8 100755 --- a/packages/primevue/src/toast/ToastMessage.vue +++ b/packages/primevue/src/toast/ToastMessage.vue @@ -100,10 +100,10 @@ export default { } }, onMessageClick(event) { - this.props.onClick && this.props.onClick({ originalEvent: event, message: this.message }); + this.props?.onClick && this.props.onClick({ originalEvent: event, message: this.message }); }, onMouseEnter(event) { - this.props.onMouseEnter && this.props.onMouseEnter({ originalEvent: event, message: this.message }); + this.props?.onMouseEnter && this.props.onMouseEnter({ originalEvent: event, message: this.message }); if (event.defaultPrevented) { return; @@ -116,7 +116,7 @@ export default { } }, onMouseLeave(event) { - this.props.onMouseLeave && this.props.onMouseLeave({ originalEvent: event, message: this.message }); + this.props?.onMouseLeave && this.props.onMouseLeave({ originalEvent: event, message: this.message }); if (event.defaultPrevented) { return;