Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
301 changes: 0 additions & 301 deletions common/config/rush/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 7 additions & 15 deletions lib/src/promise/await.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,22 +318,14 @@ export function doFinally<T>(value: T | IPromise<T>, finallyFn: FinallyPromiseHa
// Simulate finally if not available
result = value.then(
function(value) {
let r = finallyFn();
if (isPromiseLike(r)) {
return r.then(function() {
return value;
});
}
return value;
return doAwait(finallyFn(), function() {
return value;
});
}, function(reason: any) {
let r = finallyFn();
if (isPromiseLike(r)) {
return r.then(function() {
throw reason;
});
}
throw reason;
});
return doAwait(finallyFn(), function() {
throw reason;
});
}) as any;
Comment thread
MSNev marked this conversation as resolved.
Comment thread
MSNev marked this conversation as resolved.
}
} else {
finallyFn();
Expand Down
Loading