@@ -224,7 +224,7 @@ export class DocumentTableView extends React.Component<DocumentTableViewProps> {
224224 onColumnResized ( event : ColumnResizedEvent ) {
225225 if ( event . finished ) {
226226 const columnState = this . columnApi ?. getColumnState ( ) || [ ] ;
227- const currentColumnWidths : Record < string , number > = { } ;
227+ const currentColumnWidths : Record < string , number > = Object . create ( null ) ;
228228 for ( const column of columnState ) {
229229 if ( column . width ) currentColumnWidths [ column . colId ] = column . width ;
230230 }
@@ -888,8 +888,11 @@ export class DocumentTableView extends React.Component<DocumentTableViewProps> {
888888 path : ( string | number ) [ ] ,
889889 types : TableHeaderType [ ]
890890 ) : ColDef [ ] => {
891- const headers : Record < string , ColDef > = { } ;
892- const headerTypes : Record < string , Record < string , TableHeaderType > > = { } ;
891+ const headers : Record < string , ColDef > = Object . create ( null ) ;
892+ const headerTypes : Record <
893+ string ,
894+ Record < string , TableHeaderType >
895+ > = Object . create ( null ) ;
893896 const isEditable = this . props . isEditable ;
894897 const parentType = types . length ? types [ types . length - 1 ] : 'Object' ;
895898
@@ -944,7 +947,7 @@ export class DocumentTableView extends React.Component<DocumentTableViewProps> {
944947 the grid. This is handled here for the initial header values, and then
945948 in the GridStore for any subsequent updates. */
946949 const columnHeaders = Object . values ( headers ) ;
947- const showing : Record < string , TableHeaderType > = { } ;
950+ const showing : Record < string , TableHeaderType > = Object . create ( null ) ;
948951
949952 map ( headerTypes , function ( oids , key ) {
950953 const colTypes = Object . values ( oids ) ;
0 commit comments