flipping icon indicating copy to clipboard operation
flipping copied to clipboard

Uncaught TypeError: Cannot read property 'parentElement' of undefined

Open Erudition opened this issue 5 years ago • 0 comments

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...

Erudition avatar Feb 01 '21 21:02 Erudition