mirror of
https://github.com/Hopiu/postal.js.git
synced 2026-05-14 10:03:10 +00:00
Fixed bug where iterating over subscriptions gets thrown 'off by 1' when a handler unsubscribes as part of it's operation
This commit is contained in:
parent
6f4436b831
commit
2b44a9f020
1 changed files with 1 additions and 0 deletions
|
|
@ -35,6 +35,7 @@ var localBus = {
|
|||
} );
|
||||
|
||||
_.each( this.subscriptions[envelope.channel], function ( topic ) {
|
||||
// TODO: research faster ways to handle this than _.clone
|
||||
_.each( _.clone(topic), function ( subDef ) {
|
||||
if ( postal.configuration.resolver.compare( subDef.topic, envelope.topic ) ) {
|
||||
if ( _.all( subDef.constraints, function ( constraint ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue