@@ -470,7 +470,7 @@ function defineInterfaces(
470
470
'an Array.'
471
471
) ;
472
472
473
- const implementedTypeNames = { } ;
473
+ const implementedTypeNames = Object . create ( null ) ;
474
474
interfaces . forEach ( iface => {
475
475
invariant (
476
476
iface instanceof GraphQLInterfaceType ,
@@ -513,7 +513,7 @@ function defineFieldMap<TSource, TContext>(
513
513
'function which returns such an object.'
514
514
) ;
515
515
516
- const resultFieldMap = { } ;
516
+ const resultFieldMap = Object . create ( null ) ;
517
517
fieldNames . forEach ( fieldName => {
518
518
assertValidName ( fieldName ) ;
519
519
const fieldConfig = fieldMap [ fieldName ] ;
@@ -818,7 +818,7 @@ function defineTypes(
818
818
'Must provide Array of types or a function which returns ' +
819
819
`such an array for Union ${ unionType . name } .`
820
820
) ;
821
- const includedTypeNames = { } ;
821
+ const includedTypeNames = Object . create ( null ) ;
822
822
types . forEach ( objType => {
823
823
invariant (
824
824
objType instanceof GraphQLObjectType ,
@@ -1091,7 +1091,7 @@ export class GraphQLInputObjectType {
1091
1091
`${ this . name } fields must be an object with field names as keys or a ` +
1092
1092
'function which returns such an object.'
1093
1093
) ;
1094
- const resultFieldMap = { } ;
1094
+ const resultFieldMap = Object . create ( null ) ;
1095
1095
fieldNames . forEach ( fieldName => {
1096
1096
assertValidName ( fieldName ) ;
1097
1097
const field = {
0 commit comments