Skip to content

Commit

Permalink
fix undesired unrelayed error warning
Browse files Browse the repository at this point in the history
  • Loading branch information
vilicvane committed Dec 30, 2015
1 parent 82d50c0 commit e77a7b8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/.vscode/launch.json

/src/dev/
/node_modules/
/coverage/
/bld/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "thenfail",
"version": "0.3.17",
"version": "0.3.18",
"description": "Promises/A+ implementation with the ability to break or cancel the chain. Written in TypeScript.",
"registry": "npm",
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions src/promise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ export class Promise<T> implements PromiseLike<T> {
}
} else {
callback(value._state, value._valueOrReason);
value._handled = true;
}
} else if (value) {
switch (typeof value) {
Expand Down Expand Up @@ -561,10 +562,10 @@ export class Promise<T> implements PromiseLike<T> {
} else if (typeof promiseOrCallback === 'function') {
this.then(
value => {
(<NodeStyleCallback<T>>promiseOrCallback)(undefined, value);
promiseOrCallback(undefined, value);
},
reason => {
(<NodeStyleCallback<T>>promiseOrCallback)(reason, undefined)
promiseOrCallback(reason, undefined)
}
);
} else {
Expand Down

0 comments on commit e77a7b8

Please sign in to comment.