@@ -107,13 +107,15 @@ function visitor(result, parsedResults, node, key) {
107
107
if ( isUrlFunc . test ( valueNode . value ) ) {
108
108
needIgnore = getWebpackIgnoreCommentValue ( index , valueNodes , inBetween ) ;
109
109
110
- if ( isIgnoreOnDeclaration && needIgnore !== false ) {
111
- return ;
112
- }
110
+ if (
111
+ ( isIgnoreOnDeclaration && typeof needIgnore === "undefined" ) ||
112
+ needIgnore
113
+ ) {
114
+ if ( needIgnore ) {
115
+ // eslint-disable-next-line no-undefined
116
+ needIgnore = undefined ;
117
+ }
113
118
114
- if ( needIgnore ) {
115
- // eslint-disable-next-line no-undefined
116
- needIgnore = undefined ;
117
119
return ;
118
120
}
119
121
@@ -145,14 +147,15 @@ function visitor(result, parsedResults, node, key) {
145
147
valueNode . nodes
146
148
) ;
147
149
148
- if ( isIgnoreOnDeclaration && needIgnore !== false ) {
149
- // eslint-disable-next-line no-continue
150
- continue ;
151
- }
150
+ if (
151
+ ( isIgnoreOnDeclaration && typeof needIgnore === "undefined" ) ||
152
+ needIgnore
153
+ ) {
154
+ if ( needIgnore ) {
155
+ // eslint-disable-next-line no-undefined
156
+ needIgnore = undefined ;
157
+ }
152
158
153
- if ( needIgnore ) {
154
- // eslint-disable-next-line no-undefined
155
- needIgnore = undefined ;
156
159
// eslint-disable-next-line no-continue
157
160
continue ;
158
161
}
@@ -184,14 +187,15 @@ function visitor(result, parsedResults, node, key) {
184
187
valueNode . nodes
185
188
) ;
186
189
187
- if ( isIgnoreOnDeclaration && needIgnore !== false ) {
188
- // eslint-disable-next-line no-continue
189
- continue ;
190
- }
190
+ if (
191
+ ( isIgnoreOnDeclaration && typeof needIgnore === "undefined" ) ||
192
+ needIgnore
193
+ ) {
194
+ if ( needIgnore ) {
195
+ // eslint-disable-next-line no-undefined
196
+ needIgnore = undefined ;
197
+ }
191
198
192
- if ( needIgnore ) {
193
- // eslint-disable-next-line no-undefined
194
- needIgnore = undefined ;
195
199
// eslint-disable-next-line no-continue
196
200
continue ;
197
201
}
0 commit comments