Fixed #4063 - Toast: Crashing when no severity value is provided
parent
20f559163a
commit
c66706faa1
|
@ -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'
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div :class="cx('container')" role="alert" aria-live="assertive" aria-atomic="true" v-bind="ptm('container')">
|
||||
<div :class="cx('content')" v-bind="ptm('content')">
|
||||
<template v-if="!templates.message">
|
||||
<component :is="templates.icon ? templates.icon : iconComponent.name ? iconComponent : 'span'" :class="cx('icon')" v-bind="ptm('icon')" />
|
||||
<component :is="templates.icon ? templates.icon : iconComponent && iconComponent.name ? iconComponent : 'span'" :class="cx('icon')" v-bind="ptm('icon')" />
|
||||
<div :class="cx('text')" v-bind="ptm('text')">
|
||||
<span :class="cx('summary')" v-bind="ptm('summary')">{{ message.summary }}</span>
|
||||
<div :class="cx('detail')" v-bind="ptm('detail')">{{ message.detail }}</div>
|
||||
|
@ -19,13 +19,13 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import BaseComponent from 'primevue/basecomponent';
|
||||
import CheckIcon from 'primevue/icons/check';
|
||||
import ExclamationTriangleIcon from 'primevue/icons/exclamationtriangle';
|
||||
import InfoCircleIcon from 'primevue/icons/infocircle';
|
||||
import TimesIcon from 'primevue/icons/times';
|
||||
import TimesCircleIcon from 'primevue/icons/timescircle';
|
||||
import Ripple from 'primevue/ripple';
|
||||
import BaseComponent from 'primevue/basecomponent';
|
||||
|
||||
export default {
|
||||
name: 'ToastMessage',
|
||||
|
|
Loading…
Reference in New Issue