Skip to content

Commit

Permalink
[Closes #3] Bug Fixed: Unhandled promise rejection
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Goncharov committed Aug 19, 2019
1 parent 30c888c commit 120dce1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "class-logger",
"version": "1.1.0",
"version": "1.2.0",
"description": "Boilerplate-free decorator-based class logging",
"keywords": [
"decorator",
Expand Down
4 changes: 2 additions & 2 deletions src/class-wrapper.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ export class ClassWrapperService {
}

try {
const fnRes = fn.apply(this, args)
let fnRes = fn.apply(this, args)
if (classWrapper.isPromise(fnRes)) {
fnRes
fnRes = fnRes
.then((result: any) => {
logEnd(result)
return result
Expand Down

0 comments on commit 120dce1

Please sign in to comment.