Toast: Crashing when no severity value is provided #4063
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
According to the docs, when adding a toast, the
severity
value is optional and it defaults to"info"
, so when we provide noseverity
value, the toast should render as an info toast.But if we use the following code, the rendering of the toast fails.
It throws an
Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating '$options.iconComponent.name')
error.This code works as expected:
Reproducer
https://codesandbox.io/p/sandbox/lingering-star-zq3cdk?file=%2Fsrc%2FApp.vue%3A31%2C13
PrimeVue version
3.29.2
Vue version
3.x
Language
TypeScript
Build / Runtime
Vue CLI App
Browser(s)
No response
Steps to reproduce the behavior
Open the codesandbox and click on the button to show a toast and raise the error.
Expected behavior
The toast should work without providing a
severity
value.The text was updated successfully, but these errors were encountered: