Fix syntax to check if an element is in a set

This commit is contained in:
Himanshu Mishra
2020-05-05 20:25:45 +09:00
parent b2b91013eb
commit f40ccc38a4
@@ -34,7 +34,7 @@ class WebpackPluginFailBuildOnWarning {
if (warnings.length > 0) {
// Throw error if there are unexpected warnings.
for (let warning of warnings) {
if (!(warning.name in this.warningsWhitelist)) {
if (!this.warningsWhitelist.has(warning.name)) {
process.on('beforeExit', () => {
console.log(
`You have some unexpected warning(s) in your webpack build. Exiting process as error.`,