File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -812,7 +812,7 @@ function createInputObjectDefaultValueCircularRefsValidator(
812812 ) : void {
813813 // Start with an empty object as a way to visit every field in this input
814814 // object type and apply every default value.
815- return detectValueDefaultValueCycle ( inputObj , { } ) ;
815+ return detectValueDefaultValueCycle ( inputObj , Object . create ( null ) ) ;
816816 } ;
817817
818818 function detectValueDefaultValueCycle (
@@ -910,7 +910,7 @@ function createInputObjectDefaultValueCircularRefsValidator(
910910
911911 // Check to see if there is cycle.
912912 const cycleIndex = fieldPathIndex [ fieldStr ] ;
913- if ( cycleIndex !== undefined && cycleIndex > 0 ) {
913+ if ( cycleIndex !== undefined ) {
914914 context . reportError (
915915 `Invalid circular reference. The default value of Input Object field ${ fieldStr } references itself${
916916 cycleIndex < fieldPath . length
You can’t perform that action at this time.
0 commit comments