You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 12, 2019. It is now read-only.
Yeah. For example, if I createSet('resource', 'Registration') and remove documents belonging to it, the doc's remove event will be emitted without resource property in state (doc.get('resource') === null).
Hmm, so you'd rather emit the remove event before the thing is actually removed?
... this creates a potential race condition...
I always try and emit the event after the state is stable again,
because anything can happen in the event listener, i.e. the item can join another group.
what if, instead, the remove event provided the set that it was in,
set.on('remove',function(item,value,key){//item was removed from the key=value set})
I think you could do the same stuff, but it wouldn't expose you to difficult bugs.
Since
doc.set(key, null)
is called here,doc.on('remove')
listeners get a documents without the filter property.The text was updated successfully, but these errors were encountered: