nrw / observ-varhash

An object with observable key value pairs that can be added and removed
14 stars 12 forks source link

Added reference to currentTransaction in `put` (to be passed into `watch`) #17

Closed colingourlay closed 9 years ago

colingourlay commented 9 years ago

Whenever put is called, there's no reference to currentTransaction, so when it calls watch, that just tries to set an undefined argument, either side of its call to set.

I may not understand your intentions correctly, but this seems like a bug. If you don't actually need currentTransaction to be updated during a put, the assignments inside watch should be conditional upon the currentTransaction argument existing.

nrw commented 9 years ago

this was a good bugfix. thanks!