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.
Whenever
put
is called, there's no reference tocurrentTransaction
, so when it callswatch
, that just tries to set an undefined argument, either side of its call toset
.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 insidewatch
should be conditional upon thecurrentTransaction
argument existing.