collections
Advanced tools
Comparing version 5.1.6 to 5.1.7
@@ -204,24 +204,25 @@ "use strict"; | ||
var tokenName = listeners.specificHandlerMethodName; | ||
if(Array.isArray(listeners._current) && listeners._current.length) { | ||
if(Array.isArray(listeners._current)) { | ||
if(listeners._current.length) { | ||
//removeGostListenersIfNeeded returns listeners.current or a new filtered one when conditions are met | ||
var currentListeners = listeners.removeCurrentGostListenersIfNeeded(), | ||
i, countI, listener; | ||
descriptor.isActive = true; | ||
//removeGostListenersIfNeeded returns listeners.current or a new filtered one when conditions are met | ||
var currentListeners = listeners.removeCurrentGostListenersIfNeeded(), | ||
i, countI, listener; | ||
descriptor.isActive = true; | ||
try { | ||
for(i=0, countI = currentListeners.length;i<countI;i++) { | ||
// dispatch to each listener | ||
if ((listener = currentListeners[i]) !== Ghost) { | ||
if (listener[tokenName]) { | ||
listener[tokenName](value, key, this); | ||
} else if (listener.call) { | ||
listener.call(listener, value, key, this); | ||
} else { | ||
throw new Error("Handler " + listener + " has no method " + tokenName + " and is not callable"); | ||
try { | ||
for(i=0, countI = currentListeners.length;i<countI;i++) { | ||
// dispatch to each listener | ||
if ((listener = currentListeners[i]) !== Ghost) { | ||
if (listener[tokenName]) { | ||
listener[tokenName](value, key, this); | ||
} else if (listener.call) { | ||
listener.call(listener, value, key, this); | ||
} else { | ||
throw new Error("Handler " + listener + " has no method " + tokenName + " and is not callable"); | ||
} | ||
} | ||
} | ||
} finally { | ||
descriptor.isActive = false; | ||
} | ||
} finally { | ||
descriptor.isActive = false; | ||
} | ||
@@ -228,0 +229,0 @@ } |
{ | ||
"name": "collections", | ||
"version": "5.1.6", | ||
"version": "5.1.7", | ||
"description": "data structures with idiomatic JavaScript collection interfaces", | ||
@@ -5,0 +5,0 @@ "homepage": "http://www.collectionsjs.com", |
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
296788
7771