mozilla / scanjs

[DEPRECATED] Static analysis tool for javascript code.
Other
428 stars 39 forks source link

Array.prototype.find() is only compatible with Firefox 25 #97

Closed rbhitchcock closed 10 years ago

rbhitchcock commented 10 years ago

Replace this with something that is cross-browser compatible.

pauljt commented 10 years ago

Whoops. Added polyfill for support in other browsers. Based on: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find#Polyfill

Do you mind testing? (seems to work in chrome for me)

pauljt commented 10 years ago

Added #102 to fix this.

mozfreddyb commented 10 years ago

I think we could have solved this more cleanly with indexOf or so, but this has been solved with #102, so I'm closing this :)