Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Expression can be replaced with a cast
1 parent 2e2b9a9 commit d3b2a57Copy full SHA for d3b2a57
1 file changed
javascript/ql/src/Quality/UnhandledStreamPipe.ql
@@ -218,9 +218,7 @@ private DataFlow::SourceNode sourceStreamRef(PipeCall pipeCall) {
218
* Holds if the source stream of the given pipe call has an `error` handler registered.
219
*/
220
private predicate hasErrorHandlerRegistered(PipeCall pipeCall) {
221
- exists(ErrorHandlerRegistration handler |
222
- handler = sourceStreamRef(pipeCall).getAMethodCall(getEventHandlerMethodName())
223
- )
+ sourceStreamRef(pipeCall).getAMethodCall(_) instanceof ErrorHandlerRegistration
224
or
225
hasPlumber(pipeCall)
226
}
0 commit comments