mirror of https://github.com/curbengh/hexo-yam
fix: bind 'this' to error()
This commit is contained in:
parent
5de4a237b7
commit
461fe1dd41
|
@ -69,7 +69,7 @@ async function minifyCss (str, data) {
|
||||||
if (options.logger) verbose.call(this, str, result.styles, path, 'css')
|
if (options.logger) verbose.call(this, str, result.styles, path, 'css')
|
||||||
return result.styles
|
return result.styles
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
error(err)
|
error.call(this, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ function gzipFn () {
|
||||||
if (options.logger) verbose.call(this, input, result.toString(), path, 'gzip')
|
if (options.logger) verbose.call(this, input, result.toString(), path, 'gzip')
|
||||||
resolve(route.set(path + '.gz', result))
|
resolve(route.set(path + '.gz', result))
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
error(err)
|
error.call(this, err)
|
||||||
reject(err)
|
reject(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -195,7 +195,7 @@ function brotliFn () {
|
||||||
if (options.logger) verbose.call(this, input, result.toString(), path, 'brotli')
|
if (options.logger) verbose.call(this, input, result.toString(), path, 'brotli')
|
||||||
resolve(route.set(path + '.br', result))
|
resolve(route.set(path + '.br', result))
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
error(err)
|
error.call(this, err)
|
||||||
reject(err)
|
reject(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue