fix: bind 'this' to error()

This commit is contained in:
curbengh 2019-10-06 06:33:35 +01:00
parent 5de4a237b7
commit 461fe1dd41
No known key found for this signature in database
GPG Key ID: 21EA847C35D6E034
1 changed files with 3 additions and 3 deletions

View File

@ -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)
} }
} }