TypeError: e.fixers is undefined error for prefixfree on dynamically loaded iframes

263 Views Asked by At

I'm dynamically loading an iframe with some code to execute within - it's a code playground with codemirror instance under it. One of the pieces of code that executes inside of iframe is the prefixfree.min.js from Lea Verou.

On load / unload of the iframe I get the following error:

TypeError: i is null


...;u(s)&&t.indexOf(s)===-1&&t.push(s)}}},u=function(e){return StyleFix.camelCase(e...


prefixfree.min.js (line 5, col 3756)
TypeError: e.fixers is undefined


...,0,t)},fix:function(t,n,r){for(var i=0;i<e.fixers.length;i++)t=e.fixers[i](t,n,r...

What does this error mean?

1

There are 1 best solutions below

2
On

If you are using the un-minified version, then you can get an error report that tells if variable self.fixer is not defined.

So it will need to check if that variable is defined before executing any codes after it.

I have pulled a request here

If you are not required to use cdnjs, then you can download this un-minified prefixfree and then load it into your application or minify it first.