Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property 'add' of undefined #97

Closed
joepsyko opened this issue Nov 28, 2017 · 5 comments
Closed

Uncaught TypeError: Cannot read property 'add' of undefined #97

joepsyko opened this issue Nov 28, 2017 · 5 comments

Comments

@joepsyko
Copy link

@joepsyko joepsyko commented Nov 28, 2017

I upgraded from 1.1.5 to 1.2.0 and now I have the following issue.

When executing instance.hide()

buttons: [
    ['<button>Dismiss</button>', (instance, toast) => {
        instance.hide({
            transitionOut: 'fadeOutUp',
            onClosing: (instance, toast, closedBy) => {
                // ...
            }
        }, toast, 'close', 'btn2');
    }, true],
],

I have the following error:
Uncaught TypeError: Cannot read property 'add' of undefined

Here is the line:

$toast.classList.add(PLUGIN_NAME+'-closing');

Anyone had the same problem?

@ferdiebergado
Copy link

@ferdiebergado ferdiebergado commented Nov 30, 2017

I also have the same problem.

@marcelodolza
Copy link
Owner

@marcelodolza marcelodolza commented Dec 3, 2017

I'll check, thank you.

@Alekzv9
Copy link

@Alekzv9 Alekzv9 commented Dec 12, 2017

I think that is because the implementation of the hide method changes, now its like this:
iziToast.hide(toast, {
transitionOut: 'fadeOutUp'
});

@joepsyko
Copy link
Author

@joepsyko joepsyko commented Dec 19, 2017

It works, thank you!

@vagh
Copy link

@vagh vagh commented Feb 1, 2018

@Dolce This problem is also exits in current verision on your document, Hope you can modifiy this example code in you doc page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants