Update javascript/ql/lib/semmle/javascript/frameworks/React.qll

Co-authored-by: Asger F <asgerf@github.com>
This commit is contained in:
Kristen Newbury
2025-10-23 09:57:10 -04:00
committed by Asger F
parent 7f8ccb7d46
commit ee60f8e6c6

View File

@@ -806,10 +806,12 @@ private class ReactRouterLocationSource extends DOM::LocationSource::Range {
private class UseRefDomValueSource extends DOM::DomValueSource::Range {
UseRefDomValueSource() {
exists(DataFlow::PropRead current, UseRefStep step | current = this |
step.step(_, current) and
current.mayHavePropertyName("current")
)
this =
any(JsxAttribute attrib | attrib.getName() = "ref")
.getValue()
.flow()
.getALocalSource()
.getAPropertyRead("current")
}
}