Skip to content

Commit

Permalink
Allow redefining name property in awaitable (#1701)
Browse files Browse the repository at this point in the history
  • Loading branch information
binarykitchen authored and aearly committed Jan 23, 2020
1 parent f9ad468 commit e64e333
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/internal/awaitify.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default function awaitify (asyncFn, arity = asyncFn.length) {
}

Object.defineProperty(awaitable, 'name', {
configurable: true, // allows redefining
value: `awaitable(${asyncFn.name})`
})

Expand Down

0 comments on commit e64e333

Please sign in to comment.