We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Expression can be replaced with a cast
1 parent 2e2b9a9 commit d3b2a57Copy full SHA for d3b2a57
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