We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 608bcc6 commit e26c4a5Copy full SHA for e26c4a5
packages/goto/src/index.js
@@ -34,8 +34,8 @@ const castArray = value => [].concat(value).filter(Boolean)
34
const run = async ({ fn, timeout, debug: props }) => {
35
const duration = debug.duration()
36
const result = await pReflect(timeout ? pTimeout(fn, timeout) : fn)
37
- if (result.isRejected) props.error = result.reason.message || result.reason
38
- duration(props)
+ const errorProps = result.isRejected ? { error: result.reason.message || result.reason } : ''
+ duration(props, errorProps)
39
return result
40
}
41
0 commit comments