Open luxaritas opened 6 years ago
Note - this is only in a production build
If I enable source map and look at the line the error is thrown at:
And then got to the function that calls it:
The error is thrown because while the outer function passes a function named for_
, define
doesn't see the function's name.
If I turn source map off and look at define
, we can see that the console.assert
is still there, but the function that's passed doesn't have a name:
(The right rectangle is what I search for it by. The highlighted line is the line the debugger is on)
The call to define: (I'm sure that this is the call because this is the only occurrence of "for" on that line).
I've checked in their repo (in v0.1.42), and polyfill.min.js does not include the problematic console.assert.
My theory is that we use the original polyfill.js (instead of polyfill.min.js) in production build, but our compiler optimized out the function name, but not the console.assert.
EDIT: Apparently, they've documented something similar in their README (https://github.com/inexorabletash/polyfill): However, this should only apply if we minify our own version of polyfill.js
We are minifying the keyboard file ourselves - we shouldn't be using the entire polyfill though. Not quite sure what the deal is there
On loading a puzzle, I get something like this:
This traces back to
js-polyfills/polyfills.js
... which we shouldn't even be loading (we only import the keyboard script)? No issues due to this that I can see, but it would be great to get rid of the log spam.