Comparing version 3.0.0 to 3.0.1
12
index.js
@@ -23,3 +23,3 @@ var nextTick | ||
return new Promise(function(resolve, reject) { | ||
handle({ onFulfilled: onFulfilled, onRejected: onRejected, resolve: resolve, reject: reject }) | ||
handle(new Handler(onFulfilled, onRejected, resolve, reject)) | ||
}) | ||
@@ -35,3 +35,3 @@ } | ||
var cb = state ? deferred.onFulfilled : deferred.onRejected | ||
if (typeof cb !== 'function'){ | ||
if (cb === null) { | ||
(state ? deferred.resolve : deferred.reject)(value) | ||
@@ -100,1 +100,9 @@ return | ||
} | ||
function Handler(onFulfilled, onRejected, resolve, reject){ | ||
this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null | ||
this.onRejected = typeof onRejected === 'function' ? onRejected : null | ||
this.resolve = resolve | ||
this.reject = reject | ||
} |
{ | ||
"name": "promise", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Bare bones Promises/A+ implementation", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
7751
5
93
0