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

Comments

Projects
None yet
5 participants
@joepsyko
Copy link

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

This comment has been minimized.

Copy link

commented Nov 30, 2017

I also have the same problem.

@marcelodolza

This comment has been minimized.

Copy link
Owner

commented Dec 3, 2017

I'll check, thank you.

@Alekzv9

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Author

commented Dec 19, 2017

It works, thank you!

@vagh

This comment has been minimized.

Copy link

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
You can’t perform that action at this time.