Comparing version 5.0.0 to 5.0.1
@@ -143,3 +143,3 @@ "use strict"; | ||
} | ||
emitQueue.push({ value: newValue }); | ||
emitQueue.push({ value: newValue, channel }); | ||
if (isEmitting) { | ||
@@ -152,3 +152,6 @@ return; | ||
emitQueueSafe--; | ||
const value = emitQueue.shift().value; | ||
const emitItem = emitQueue.shift(); | ||
if (emitItem.channel !== DEFAULT_CHANNEL && emitItem.channel !== channel) { | ||
continue; | ||
} | ||
nextSubscriptions = [...subscriptions]; | ||
@@ -160,3 +163,3 @@ let safe = maxSubscriptionCount; | ||
if (channel === DEFAULT_CHANNEL || item.channel === channel) { | ||
item.callback(value); | ||
item.callback(emitItem.value); | ||
} | ||
@@ -163,0 +166,0 @@ } |
{ | ||
"name": "suub", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "A simple pub/sub written in Typescript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33627
614