leoasis / redux-immutable-state-invariant

Redux middleware that detects mutations between and outside redux dispatches. For development use only.
MIT License
937 stars 37 forks source link

Error: Object doesn't support property or method 'isNaN' on IE11 #36

Open song-jia opened 6 years ago

song-jia commented 6 years ago

This issue only happened on IE 11 browser. It should because method Number.isNaN used in below code is not supported in IE 11.

trackForMutations.js (49, 3)

  if (sameParentRef && !sameRef && !Number.isNaN(obj)) {
    return { wasMutated: true, path: path };
  }
leoasis commented 6 years ago

Do you want to provide a PR that changes this to use the global isNan function? This should be enough to fix this.

bijoyanupam commented 5 years ago

hi @leoasis , created a related changes her: https://github.com/leoasis/redux-immutable-state-invariant/pull/39