JS: Restrict getAContextInput

This commit is contained in:
Asger Feldthaus
2020-10-30 09:28:06 +00:00
parent fee944ac2a
commit 6ab7846e81

View File

@@ -632,6 +632,7 @@ private DataFlow::SourceNode getAContextRef(DataFlow::CallNode createContext) {
*/
pragma[nomagic]
private DataFlow::Node getAContextInput(DataFlow::CallNode createContext) {
createContext = react().getAMemberCall("createContext") and
result = createContext.getArgument(0) // initial value
or
exists(JSXElement provider |