diff --git a/javascript/ql/src/Statements/IgnoreArrayResult.qhelp b/javascript/ql/src/Statements/IgnoreArrayResult.qhelp index b70ff1f1b32..2232784d881 100644 --- a/javascript/ql/src/Statements/IgnoreArrayResult.qhelp +++ b/javascript/ql/src/Statements/IgnoreArrayResult.qhelp @@ -5,7 +5,7 @@

The concat, join and slice methods are -pure and does not modify any of the inputs or the array the method was called +pure and do not modify any of the inputs or the array the method was called on. It is therefore generally an error to ignore the return value from a call to one of these methods.

diff --git a/javascript/ql/src/Statements/IgnoreArrayResult.ql b/javascript/ql/src/Statements/IgnoreArrayResult.ql index b6137e664d7..5ab778ed95b 100644 --- a/javascript/ql/src/Statements/IgnoreArrayResult.ql +++ b/javascript/ql/src/Statements/IgnoreArrayResult.ql @@ -1,10 +1,10 @@ /** * @name Ignoring result from pure array method - * @description The array methods do not modify the array, ignoring the result of such a call is therefore generally an error. + * @description Ignoring the result of an array method that does not modify its receiver is generally an error. * @kind problem * @problem.severity warning * @id js/ignore-array-result - * @tags maintainability, + * @tags maintainability * correctness * @precision high */ @@ -16,7 +16,7 @@ DataFlow::SourceNode callsArray(DataFlow::TypeBackTracker t, DataFlow::MethodCal isIgnoredPureArrayCall(call) and ( t.start() and - result = call.getReceiver() + result = call.getReceiver().getALocalSource() or exists(DataFlow::TypeBackTracker t2 | result = callsArray(t2, call).backtrack(t2, t)) )