File tree Expand file tree Collapse file tree
javascript/ql/src/semmle/javascript/frameworks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -303,20 +303,19 @@ module Vue {
303303 result = getOptionSource ( _) .getAPropertySource ( )
304304 }
305305
306+ pragma [ noinline]
307+ private DataFlow:: PropWrite getAPropertyValueWrite ( string name ) {
308+ result = getData ( ) .getALocalSource ( ) .getAPropertyWrite ( name )
309+ or
310+ result = getABoundFunction ( ) .getALocalSource ( ) .( DataFlow:: FunctionNode ) .getReceiver ( ) .getAPropertyWrite ( name )
311+ }
312+
306313 /**
307314 * Gets the data flow node that flows into the property `name` of this instance, or is
308315 * returned form a getter defining that property.
309316 */
310317 DataFlow:: Node getAPropertyValue ( string name ) {
311- exists ( DataFlow:: SourceNode obj | obj .getAPropertyWrite ( name ) .getRhs ( ) = result |
312- obj .flowsTo ( getData ( ) )
313- or
314- exists ( DataFlow:: FunctionNode bound |
315- bound .flowsTo ( getABoundFunction ( ) ) and
316- not bound .getFunction ( ) instanceof ArrowFunctionExpr and
317- obj = bound .getReceiver ( )
318- )
319- )
318+ result = getAPropertyValueWrite ( name ) .getRhs ( )
320319 or
321320 exists ( DataFlow:: FunctionNode getter |
322321 getter .flowsTo ( getAccessor ( name , DataFlow:: MemberKind:: getter ( ) ) ) and
You can’t perform that action at this time.
0 commit comments