react-fast-compare: IE 11: Object doesn't support property or method 'isView'

Hi, I noticed in a bug report from Sentry that /index.js#L67 throws Object doesn't support property or method 'isView' in IE 11.

Broadly speaking, I think the fix would be to check for ArrayBuffer.isView before invoking it:

- if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
+ if (hasArrayBuffer && ArrayBuffer.isView && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {

I’m happy to submit a PR if you agree to this change.

Thanks.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 26 (11 by maintainers)

Most upvoted comments

Thanks, there is a branch ready to put forward as a PR in https://github.com/FormidableLabs/react-fast-compare/issues/66#issuecomment-617298760 incase that would be of any use.

Thanks @JamieMason and @antonjb! We should have a patch out soon.

This is probably quite out there, but according to this from 2016 there are older versions of IE 11 that don’t support it… https://github.com/mapbox/pbf/issues/72 I don’t really know what to say. IE 11 is one thing, but… old versions of IE 11 😆