Added condition for '+' case. (#13115)
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
This commit is contained in:
1 parent
67efa96da6
commit
00ec91bfde
3 files changed
+54
-1
No files matched your search
@@ -883,9 +883,26 @@ function isSimpleCallArgument(node, depth) {
|
||||
);
|
||||
}
|
||||
|
||||
const targetUnaryExpressionOperators = {
|
||||
"!": true,
|
||||
"-": true,
|
||||
"+": true,
|
||||
"~": true,
|
||||
};
|
||||
if (
|
||||
node.type === "UnaryExpression" &&
|
||||
(node.operator === "!" || node.operator === "-")
|
||||
targetUnaryExpressionOperators[node.operator]
|
||||
) {
|
||||
return isSimpleCallArgument(node.argument, depth);
|
||||
}
|
||||
|
||||
const targetUpdateExpressionOperators = {
|
||||
"++": true,
|
||||
"--": true,
|
||||
};
|
||||
if (
|
||||
node.type === "UpdateExpression" &&
|
||||
targetUpdateExpressionOperators[node.operator]
|
||||
) {
|
||||
return isSimpleCallArgument(node.argument, depth);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user