mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1224735 - only emit one error per possible CPOW use; r=miker,Ms2ger
This commit is contained in:
parent
43d19c030e
commit
1065e5ff33
@ -47,14 +47,16 @@ module.exports = function(context) {
|
||||
|
||||
var expression = context.getSource(node);
|
||||
|
||||
cpows.some(function(cpow) {
|
||||
// Only report a single CPOW error per node -- so if checking
|
||||
// |cpows| reports one, don't report another below.
|
||||
var someCpowFound = cpows.some(function(cpow) {
|
||||
if (cpow.test(expression)) {
|
||||
showError(node, expression);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
if (helpers.getIsGlobalScope(context)) {
|
||||
if (!someCpowFound && helpers.getIsGlobalScope(context)) {
|
||||
if (/^content\./.test(expression)) {
|
||||
showError(node, expression);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user