diff --git a/lib/filter.js b/lib/filter.js index 45fa50b..b3844dc 100644 --- a/lib/filter.js +++ b/lib/filter.js @@ -69,7 +69,7 @@ async function minifyCss (str, data) { if (options.logger) verbose.call(this, str, result.styles, path, 'css') return result.styles } 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') resolve(route.set(path + '.gz', result)) } catch (err) { - error(err) + error.call(this, err) reject(err) } } @@ -195,7 +195,7 @@ function brotliFn () { if (options.logger) verbose.call(this, input, result.toString(), path, 'brotli') resolve(route.set(path + '.br', result)) } catch (err) { - error(err) + error.call(this, err) reject(err) } }