diff --git a/javascript/ql/lib/semmle/javascript/frameworks/React.qll b/javascript/ql/lib/semmle/javascript/frameworks/React.qll index 05d8db6a075..c68b6846a5b 100644 --- a/javascript/ql/lib/semmle/javascript/frameworks/React.qll +++ b/javascript/ql/lib/semmle/javascript/frameworks/React.qll @@ -806,10 +806,9 @@ private class ReactRouterLocationSource extends DOM::LocationSource::Range { private class UseRefDomValueSource extends DOM::DomValueSource::Range { UseRefDomValueSource() { - exists(DataFlow::PropRead current, UseRefStep step, string prop | current = this | + exists(DataFlow::PropRead current, UseRefStep step | current = this | step.step(_, current) and - current.mayHavePropertyName(prop) and - prop = "current" + current.mayHavePropertyName("current") ) } }