goatslacker / alt

Isomorphic flux implementation
http://alt.js.org/
3.45k stars 322 forks source link

Fix state after returning new state object from reduce. #645

Open JorgenEvens opened 8 years ago

JorgenEvens commented 8 years ago

After returning a new state object from a reduce method there are now two state objects being used by the store. The one stored on model.state and the one stored on the AltStore instance.

The easiest way to see this is by checking whether the state passed into the reduce method is the same as that available onthis ( the model as reduce is called on it ). I would expect it to be, but it is not.

JorgenEvens commented 8 years ago

I've added node 5.11 to the list of node engines to test on Travis-CI as Babel does not seem to be to happy with node v6.