@@ -358,27 +358,27 @@ class Client extends EventEmitter {
358358
359359 _handleRowDescription ( msg ) {
360360 // delegate rowDescription to active query
361- this . activeQuery . handleRowDescription ( msg )
361+ this . activeQuery ? .handleRowDescription ( msg )
362362 }
363363
364364 _handleDataRow ( msg ) {
365365 // delegate dataRow to active query
366- this . activeQuery . handleDataRow ( msg )
366+ this . activeQuery ? .handleDataRow ( msg )
367367 }
368368
369369 _handlePortalSuspended ( msg ) {
370370 // delegate portalSuspended to active query
371- this . activeQuery . handlePortalSuspended ( this . connection )
371+ this . activeQuery ? .handlePortalSuspended ( this . connection )
372372 }
373373
374374 _handleEmptyQuery ( msg ) {
375375 // delegate emptyQuery to active query
376- this . activeQuery . handleEmptyQuery ( this . connection )
376+ this . activeQuery ? .handleEmptyQuery ( this . connection )
377377 }
378378
379379 _handleCommandComplete ( msg ) {
380380 // delegate commandComplete to active query
381- this . activeQuery . handleCommandComplete ( msg , this . connection )
381+ this . activeQuery ? .handleCommandComplete ( msg , this . connection )
382382 }
383383
384384 _handleParseComplete ( msg ) {
@@ -391,11 +391,11 @@ class Client extends EventEmitter {
391391 }
392392
393393 _handleCopyInResponse ( msg ) {
394- this . activeQuery . handleCopyInResponse ( this . connection )
394+ this . activeQuery ? .handleCopyInResponse ( this . connection )
395395 }
396396
397397 _handleCopyData ( msg ) {
398- this . activeQuery . handleCopyData ( msg , this . connection )
398+ this . activeQuery ? .handleCopyData ( msg , this . connection )
399399 }
400400
401401 _handleNotification ( msg ) {
0 commit comments