yoshuawuyts / barracks

:mountain_railway: action dispatcher for unidirectional data flows
MIT License
177 stars 22 forks source link

State and previous state are equal if a namespace is used #56

Closed fapian closed 8 years ago

fapian commented 8 years ago

Hey,

i prepared this bin (http://requirebin.com/?gist=27d3737a054e1e044080d04bf516a493) to showcase the bug.

If you run it, the previous state of the namespaced version is equal to the new state. If i do the same without a namespace everything works as i would expect it.

yoshuawuyts commented 8 years ago

Ah yeah, damn - that's not good. Investigating

yoshuawuyts commented 8 years ago

Found the bug, we were mutating the previous state rather than overriding it