This PR fixes issue #4159, where a model was not properly removed from a collection after its ID was unset. The cause for this is that _onModelEvent handles potential model deletions upon detecting an event called "change", when the actual event name being sent was "change:(attribute)". An extra check was added so that the latter case is handled as well.
This PR fixes issue #4159, where a model was not properly removed from a collection after its ID was unset. The cause for this is that
_onModelEvent
handles potential model deletions upon detecting an event called "change", when the actual event name being sent was "change:(attribute)". An extra check was added so that the latter case is handled as well.