collections
Advanced tools
Comparing version 5.0.1 to 5.0.2
@@ -0,5 +1,7 @@ | ||
## v5.0.2 | ||
- Addresses a bug in range listening that happened when the number of listeners went beyond 1 and back to 0 | ||
## v5.0.1 | ||
- Changes to make IE11 use set and map polyfills | ||
## v5.0.0 | ||
@@ -6,0 +8,0 @@ - Some backward compatibility breaking changes: |
@@ -197,28 +197,30 @@ "use strict"; | ||
var tokenName = listeners.specificHandlerMethodName; | ||
if(Array.isArray(listeners._current) && listeners._current.length) { | ||
// notably, defaults to "handleRangeChange" or "handleRangeWillChange" | ||
// if token is "" (the default) | ||
if(Array.isArray(listeners._current)) { | ||
if(listeners._current.length) { | ||
// notably, defaults to "handleRangeChange" or "handleRangeWillChange" | ||
// if token is "" (the default) | ||
descriptor.isActive = true; | ||
// dispatch each listener | ||
try { | ||
var i, | ||
countI, | ||
listener, | ||
//removeGostListenersIfNeeded returns listeners.current or a new filtered one when conditions are met | ||
currentListeners = listeners.removeCurrentGostListenersIfNeeded(), | ||
Ghost = ListenerGhost; | ||
for(i=0, countI = currentListeners.length;i<countI;i++) { | ||
if ((listener = currentListeners[i]) !== Ghost) { | ||
if (listener[tokenName]) { | ||
listener[tokenName](plus, minus, index, this, beforeChange); | ||
} else if (listener.call) { | ||
listener.call(this, plus, minus, index, this, beforeChange); | ||
} else { | ||
throw new Error("Handler " + listener + " has no method " + tokenName + " and is not callable"); | ||
descriptor.isActive = true; | ||
// dispatch each listener | ||
try { | ||
var i, | ||
countI, | ||
listener, | ||
//removeGostListenersIfNeeded returns listeners.current or a new filtered one when conditions are met | ||
currentListeners = listeners.removeCurrentGostListenersIfNeeded(), | ||
Ghost = ListenerGhost; | ||
for(i=0, countI = currentListeners.length;i<countI;i++) { | ||
if ((listener = currentListeners[i]) !== Ghost) { | ||
if (listener[tokenName]) { | ||
listener[tokenName](plus, minus, index, this, beforeChange); | ||
} else if (listener.call) { | ||
listener.call(this, plus, minus, index, this, beforeChange); | ||
} else { | ||
throw new Error("Handler " + listener + " has no method " + tokenName + " and is not callable"); | ||
} | ||
} | ||
} | ||
} finally { | ||
descriptor.isActive = false; | ||
} | ||
} finally { | ||
descriptor.isActive = false; | ||
} | ||
@@ -225,0 +227,0 @@ } |
{ | ||
"name": "collections", | ||
"version": "5.0.1", | ||
"version": "5.0.2", | ||
"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
278273
7389