tungus icon indicating copy to clipboard operation
tungus copied to clipboard

Driver fails to delete the last subdocument in a collection of subdocuments on a parent document.

Open vogelrh opened this issue 8 years ago • 0 comments

When subdocuments are added to a property (on the parent) containing a collection of these subdocuments, and then these subdocuments are removed from the parent,the tungus driver fails to remove the last document in the collection. I tracked the bug down to line 101 in the updater.js module in the applyPull method. It appears that the obj parameter needs to be passed into the "matcher" function "as-is", not wrapped in another object.

The applyPull method only appears to be called when the last subdocument is deleted. All other subdocument deletions are handled by the applySet method.

vogelrh avatar Jun 11 '16 19:06 vogelrh