fix: wait error hook

This commit is contained in:
Clark Du 2019-01-15 11:02:10 +00:00
parent e594f09914
commit 36ca945d00

View File

@ -34,7 +34,7 @@ export default class Hookable {
try {
await sequence(this._hooks[name], fn => fn(...args))
} catch (err) {
name !== 'error' && this.callHook('error', err)
name !== 'error' && await this.callHook('error', err)
consola.fatal(err)
}
}