Closed a-xin closed 6 years ago
Hey @soumak77 I'm happy to take a look at it. Do you happen to have any suspicion what could be causing this issue?
@a-xin I think I just found the issue. I'm refactoring the code to use lodash 4.x and stumbled across this code: https://github.com/soumak77/firebase-mock/blob/1c348c14b812a20a15ae388352413f12bac63790/src/firebase.js#L340-L358
Looks like I didn't replace this
with self
in all places. This change will be made with my other changes to support lodash 4.x.
@a-xin please see if this has been resolved with v2.1.3
@a-xin I found and fixed the root cause. Nested values were not being cloned properly.
@soumak77 Thanks, great you caught the root cause!
Adding the following test to
test/unit/firebase.js
(MockFirebase #transaction
):Fails with:
I would have expected both paths to return the updated data and therefore the test to pass.