Skip to content

Commit

Permalink
security: upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sebdvd committed Jul 17, 2019
1 parent 18be51a commit b5e3765
Show file tree
Hide file tree
Showing 8 changed files with 6,696 additions and 1,554 deletions.
2 changes: 2 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
singleQuote: true
trailingComma: es5
39 changes: 21 additions & 18 deletions CancelablePromise.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,28 @@ export default class CancelablePromise {

then(success, error) {
const p = new CancelablePromise((resolve, reject) => {
this._promise.then((r) => {
if (this._canceled) {
p.cancel();
this._promise.then(
r => {
if (this._canceled) {
p.cancel();
}
if (success && !this._canceled) {
handleCallback(resolve, reject, success, r);
} else {
resolve(r);
}
},
r => {
if (this._canceled) {
p.cancel();
}
if (error && !this._canceled) {
handleCallback(resolve, reject, error, r);
} else {
reject(r);
}
}
if (success && !this._canceled) {
handleCallback(resolve, reject, success, r);
} else {
resolve(r);
}
}, (r) => {
if (this._canceled) {
p.cancel();
}
if (error && !this._canceled) {
handleCallback(resolve, reject, error, r);
} else {
reject(r);
}
});
);
});
return p;
}
Expand Down
Loading

0 comments on commit b5e3765

Please sign in to comment.