Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
Looks like this changes were done for ES standards. But its breaking with below error :

TypeError: Cannot read property 'hasOwnProperty' of undefined
  • Loading branch information
pratikgolchha authored Apr 27, 2020
1 parent 6d9761a commit 376b973
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function WebpackClean (
WebpackClean.prototype.apply = function (compiler) {
const self = this;
// eslint-disable-next-line no-prototype-builtins
const hasLifecycleHooks = compiler.prototype.hasOwnProperty('hooks'); // Webpack 4.x.x
const hasLifecycleHooks = Object.prototype.hasOwnProperty.call(compiler, 'hooks'); // Webpack 4.x.x
const logErrMsg = 'Files removal aborted due to:';

if (hasLifecycleHooks) {
Expand Down

0 comments on commit 376b973

Please sign in to comment.