Closed distracteddev closed 1 year ago
Good find, and thanks for writing tests to verify the issue's fixed!
This issue was introduction with the creation of CounterMap: https://github.com/derbyjs/racer/commit/0cb0bf2a2114f2c41432163b7824d791cfa4f34b#diff-e786030b6c8e8ddf44d387d7af5a48e3bb45c7898cb52f06c1452f2903d82ab5R117
Context
Previously, when calling
Model.unload()
, we were accidentally iterating over the properties of a CounterMap rather than iterating over the keys within the CounterMap.Changes
Model.unload()
to correctly iterate over the keys within the CounterMap's count property and pass the resulting document IDs into unfetchDoc, unsubscribeDoc, and _maybeUnloadDoc.Proof of failing tests before patch