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 'parentElement' of undefined #31

Open
Erudition opened this issue Feb 1, 2021 · 0 comments
Open

Comments

@Erudition
Copy link

Uncaught TypeError: Cannot read property 'parentElement' of undefined
    at t.flip (flipping.web.js:1)

I get this every time I use the library and call flip() - no matter which js file I pick.
I looked at the source code, and it compiles to lines including these:

            t.prototype.flip = function(t) {
                var e = this;
                void 0 === t && (t = {});
                var n = t.parent || this.parentElement
                  , r = this.selectActive(n)
                  , i = {};
                return r.forEach(function(t, r) {
                    var o = t.getAttribute(e.attribute);

That this.parentElement call is the problem. In every browser I've tried, this was undefined there, and you cant get the .parentElement of undefined.

The error message varies, but it's always about this...

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

No branches or pull requests

1 participant