objectivehtml / FlipClock

http://flipclockjs.com/
MIT License
2.74k stars 954 forks source link

isConstructor() check fails in IE11 #396

Open thomasdeater opened 4 years ago

thomasdeater commented 4 years ago

Using the js-es6 branch I discovered that the isConstructor() check fails in IE11 because Function.name is not supported.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name

I implemented a polyfill found here:

https://stackoverflow.com/a/17056530

Patching flipclock would probably be a better resolution, but as I'm using the npm package it was easier to add the polyfill.