From c66706faa1230f414bebbbe2b3066b2c8457dca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Tue, 20 Jun 2023 11:39:17 +0300 Subject: [PATCH] Fixed #4063 - Toast: Crashing when no severity value is provided --- components/lib/toast/BaseToast.vue | 2 +- components/lib/toast/ToastMessage.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/lib/toast/BaseToast.vue b/components/lib/toast/BaseToast.vue index 7dbe856f1..82247a6cf 100644 --- a/components/lib/toast/BaseToast.vue +++ b/components/lib/toast/BaseToast.vue @@ -110,7 +110,7 @@ const classes = { 'p-toast-message', props.message.styleClass, { - 'p-toast-message-info': props.message.severity === 'info', + 'p-toast-message-info': props.message.severity === 'info' || props.message.severity === undefined, 'p-toast-message-warn': props.message.severity === 'warn', 'p-toast-message-error': props.message.severity === 'error', 'p-toast-message-success': props.message.severity === 'success' diff --git a/components/lib/toast/ToastMessage.vue b/components/lib/toast/ToastMessage.vue index 3c3131117..eac7052fe 100755 --- a/components/lib/toast/ToastMessage.vue +++ b/components/lib/toast/ToastMessage.vue @@ -2,7 +2,7 @@