Closed niemyjski closed 9 years ago
Thanks for the report! Can you test whether both Function.call
and Function.prototype.call
exist in PhantomJS for me?
Phantom is old and weird, and iirc, doesn't even have Function#bind prior to v2.
I'm not 100% sure if it's in the latest as there is a ton of activity there: https://github.com/ariya/phantomjs/issues/10522 .. I think a polyfill is needed (LOL)
:-) If Function#call
is present but Function.call
is not, then I'll either use the former, or fix the es6-shim
to add in Function.call
. Let me know :-)
I'd just add in Function.call :)
Ah, I see the problem.
The es6-shim
requires the es5-shim
, especially when not in a true ES5 environment like PhantomJS. Simply require that first, and the es6-shim
should work for you.
I'm targeting es5/es6 but only target evergreen browsers. I only needed es6 for startsWith... I'll see if I can bring it in only for the test runner because I'd hate to have to min that too..
only target evergreen browsers.
... PhantomJS ...
O_____O
Every single version of every single JS engine/browser in existence has both nonzero ES5 and ES6 failures - there doesn't exist an engine that doesn't need both the es5-shim
and es6-shim
, no matter how evergreen you think you're targeting.
@domenic LOL. Yeah.. I thought they were updating it and I wanted something that worked on our CI / cross plat..
Yeah, I'll bring both of them in..
[15:37:56][Step 3/4] Running "karma:all_tests" (karma) task [15:38:00][Step 3/4] PhantomJS 1.9.8 (Windows 8) ERROR [15:38:00][Step 3/4] TypeError: 'undefined' is not a function (evaluating 'Function.call.bind(String.prototype.indexOf)') [15:38:00][Step 3/4] at C:/TeamCity/buildAgent/work/3e6130cb0bb9bb89/src/bower_components/es6-shim/es6-shim.js:83 [15:38:00][Step 3/4] [15:38:00][Step 3/4] Finished in 0.121 secs / 0 secs
This is happening in all of the latest build except 0.21.1. Any ideas?