Skip to content

Commit

Permalink
Compliance with 2.1.1 of promises-aplus-tests, rev to 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jrburke committed Feb 21, 2016
1 parent 01ef1b9 commit 34b9d89
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@ A promise library for use in requirejs-related projects. If you are looking
for a robust promise library, consider [Q](https://github.com/kriskowal/q)
instead.

prim passes version 2.0.4 of the
prim passes version 2.1.1 of the
[promises-aplus-tests](https://github.com/promises-aplus/promises-tests) as the
baseline tests to check if it is working like a promise library.

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "prim",
"version": "0.0.7",
"version": "1.0.0",
"description": "Promise lib for use inside requirejs-related projects",
"main": "prim.js",
"repository": {
Expand Down
7 changes: 5 additions & 2 deletions prim.js
@@ -1,5 +1,5 @@
/**
* prim 0.0.7 Copyright (c) 2012-2013, The Dojo Foundation All Rights Reserved.
* prim 1.0.0 Copyright (c) 2012-2016, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/requirejs/prim for details
*/
Expand Down Expand Up @@ -97,7 +97,10 @@ var prim;

try {
var then = v && v.then;
if (isFunObj(v) && typeof then === 'function') {
if (isFunObj(v) && typeof then === 'function' &&
// if error, keep on error pathway if a promise,
// 2.2.7.2 tests.
prop !== 'e') {
f2 = makeFulfill();
then.call(v, f2.resolve, f2.reject);
} else {
Expand Down

0 comments on commit 34b9d89

Please sign in to comment.