fkhadra / react-toastify

React notification made easy 🚀 !
https://fkhadra.github.io/react-toastify/introduction
MIT License
12.33k stars 676 forks source link

Cannot read properties of undefined (reading 'props') at deleteToast #1053

Open jeymus opened 4 months ago

jeymus commented 4 months ago

:bug:Bug

TypeError: Cannot read properties of undefined (reading 'props') at deleteToast in withTranslation.js

This error appears on v10.0.0 and above, and is triggered when the toast is dismissed immediately after rendering. This is a similar issue to one that was previously fixed in v9.1.3 but it has now appeared again. I have tested on v9.1.3 with no issues. v9.1.3's release note:

Partially address Toast is undefined || Uncaught TypeError: Cannot read properties of undefined (reading 'content') #858 #952

Basic example:

const handleClick = async (e) => {
    const toastId = toast.loading('Loading')
    try {
        return console.log('Test log')
    }
    catch (error) {
        console.error(error)
    }
    finally {
        toast.dismiss(toastId)
    }
}
duythinh-dev commented 2 months ago

Any solution on this? I'm facing the same problem

arenier commented 2 weeks ago

Same issue here

gajraj-gan commented 1 week ago

Same

abdullahhjiim commented 1 week ago

same issue here

dolev7 commented 2 days ago

same