Comparing version 1.6.0 to 1.6.1
{ | ||
"name": "when", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "A lightweight Promise and when() implementation, plus other async goodies.", | ||
@@ -5,0 +5,0 @@ "keywords": ["promise", "promises", "deferred", "deferreds", "when", "async", "asynchronous", "cujo"], |
@@ -9,2 +9,6 @@ # when.js [![Build Status](https://secure.travis-ci.org/cujojs/when.png)](http://travis-ci.org/cujojs/when) | ||
### 1.6.1 | ||
* Fix for accidental coercion of non-promises. See [#62](https://github.com/cujojs/when/issues/60). | ||
### 1.6.0 | ||
@@ -11,0 +15,0 @@ |
@@ -10,3 +10,3 @@ /** @license MIT License (c) copyright B Cavalier & J Hann */ | ||
* | ||
* @version 1.6.0 | ||
* @version 1.6.1 | ||
*/ | ||
@@ -84,4 +84,3 @@ | ||
} else { | ||
// It's not a when.js promise. | ||
// Check to see if it's a foreign promise or a value. | ||
// It's not a when.js promise. See if it's a foreign promise or a value. | ||
@@ -95,3 +94,5 @@ // Some promises, particularly Q promises, provide a valueOf method that | ||
// See: https://github.com/kriskowal/q/issues/106 | ||
if (promiseOrValue != null && typeof promiseOrValue.valueOf === 'function') { | ||
// IMPORTANT: Must check for a promise here, since valueOf breaks other things | ||
// like Date. | ||
if (isPromise(promiseOrValue) && typeof promiseOrValue.valueOf === 'function') { | ||
promiseOrValue = promiseOrValue.valueOf(); | ||
@@ -98,0 +99,0 @@ } |
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
49972
1266
105