File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,18 +101,22 @@ export class HumanReporter extends QueryReporter {
101101 }
102102
103103 public prepNullValues ( records : unknown [ ] ) : void {
104- records . forEach ( ( record ) : void => {
105- const recordAsObject = record as never ;
106- Reflect . ownKeys ( recordAsObject ) . forEach ( ( propertyKey ) => {
107- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
108- const value = Reflect . get ( recordAsObject , propertyKey ) ;
109- if ( value === null ) {
110- Reflect . set ( recordAsObject , propertyKey , chalk . bold ( 'null' ) ) ;
111- } else if ( typeof value === 'object' ) {
112- this . prepNullValues ( [ value ] ) ;
104+ records
105+ . filter ( ( record ) => record )
106+ . forEach ( ( record ) : void => {
107+ if ( record ) {
108+ const recordAsObject = record as never ;
109+ Reflect . ownKeys ( recordAsObject ) . forEach ( ( propertyKey ) => {
110+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
111+ const value = Reflect . get ( recordAsObject , propertyKey ) ;
112+ if ( value === null ) {
113+ Reflect . set ( recordAsObject , propertyKey , chalk . bold ( 'null' ) ) ;
114+ } else if ( typeof value === 'object' ) {
115+ this . prepNullValues ( [ value ] ) ;
116+ }
117+ } ) ;
113118 }
114119 } ) ;
115- } ) ;
116120 }
117121
118122 public prepColumns ( columns : Array < Optional < string > > ) : CliUx . Table . table . Columns < Record < string , unknown > > {
You can’t perform that action at this time.
0 commit comments