mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
use set literal instead of big disjunction of literals
This commit is contained in:
@@ -76,13 +76,11 @@ class StateUpdateVolatileMethod extends Function {
|
||||
// - componentsWillMount
|
||||
// - componentsDidMount
|
||||
exists(ReactComponent c |
|
||||
methodName = "componentDidUnmount" or
|
||||
methodName = "componentDidUpdate" or
|
||||
methodName = "componentWillUpdate" or
|
||||
methodName = "getDefaultProps" or
|
||||
methodName = "getInitialState" or
|
||||
methodName = "render" or
|
||||
methodName = "shouldComponentUpdate"
|
||||
methodName =
|
||||
[
|
||||
"componentDidUnmount", "componentDidUpdate", "componentWillUpdate", "getDefaultProps",
|
||||
"getInitialState", "render", "shouldComponentUpdate"
|
||||
]
|
||||
|
|
||||
this = c.getInstanceMethod(methodName)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user