mirror of
https://github.com/Hopiu/postal.js.git
synced 2026-05-18 12:01:07 +00:00
Fixing issue where unsubscribing during a publish operation breaks the iteration of subscription definitions in localBus.
This commit is contained in:
parent
b71738d696
commit
14bae8c6c4
1 changed files with 1 additions and 1 deletions
|
|
@ -35,7 +35,7 @@ var localBus = {
|
|||
} );
|
||||
|
||||
_.each( this.subscriptions[envelope.channel], function ( topic ) {
|
||||
_.each( topic, function ( subDef ) {
|
||||
_.each( _.clone(topic), function ( subDef ) {
|
||||
if ( postal.configuration.resolver.compare( subDef.topic, envelope.topic ) ) {
|
||||
if ( _.all( subDef.constraints, function ( constraint ) {
|
||||
return constraint( envelope.data, envelope );
|
||||
|
|
|
|||
Loading…
Reference in a new issue