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

NaN handling #21

Closed matthieu-foucault closed 7 years ago

matthieu-foucault commented 7 years ago

Although it's rare, you can end up with a NaN in your state if it's the output of a mathematical function. NaN is tricky: NaN === NaN; // false Number.NaN === NaN; // false Number.isNaN(NaN); // true This PR prevents the middleware from throwing if there is a NaN in the state

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling b21595635a88d3c4e8223f2bb7203c140415fb72 on matthieu-foucault:NaN_handling into 3a2c64750f5e64ddf748d82fa93ff29aa88b8a8f on leoasis:master.

leoasis commented 7 years ago

Thanks for the contribution!

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling dd32c346f3fcfbbed31918da2c0359afb2451358 on matthieu-foucault:NaN_handling into 3a2c64750f5e64ddf748d82fa93ff29aa88b8a8f on leoasis:master.

leoasis commented 7 years ago

Great, thanks for your contribution again! Merging this

asakasinsky commented 7 years ago

Yeah!!! Thank you for this commit!