File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -146,11 +146,12 @@ export function getArgumentValues(
146
146
let isNull ;
147
147
if ( argumentNode && argumentNode . value . kind === Kind . VARIABLE ) {
148
148
const variableName = argumentNode . value . name . value ;
149
- hasValue = variableValues && hasOwnProperty ( variableValues , variableName ) ;
150
- isNull = variableValues && variableValues [ variableName ] === null ;
149
+ hasValue =
150
+ variableValues != null && hasOwnProperty ( variableValues , variableName ) ;
151
+ isNull = variableValues != null && variableValues [ variableName ] === null ;
151
152
} else {
152
153
hasValue = argumentNode != null ;
153
- isNull = argumentNode && argumentNode . value . kind === Kind . NULL ;
154
+ isNull = argumentNode != null && argumentNode . value . kind === Kind . NULL ;
154
155
}
155
156
156
157
if ( ! hasValue && argDef . defaultValue !== undefined ) {
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ function isBlank(str) {
80
80
export function printBlockString (
81
81
value : string ,
82
82
indentation ? : string = '' ,
83
- preferMultipleLines ?: ? boolean = false ,
83
+ preferMultipleLines ? : boolean = false ,
84
84
) : string {
85
85
const isSingleLine = value . indexOf ( '\n' ) === - 1 ;
86
86
const hasLeadingSpace = value [ 0 ] === ' ' || value [ 0 ] === '\t' ;
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ function allowedVariableUsage(
97
97
) : boolean {
98
98
if ( isNonNullType ( locationType ) && ! isNonNullType ( varType ) ) {
99
99
const hasNonNullVariableDefaultValue =
100
- varDefaultValue && varDefaultValue . kind !== Kind . NULL ;
100
+ varDefaultValue != null && varDefaultValue . kind !== Kind . NULL ;
101
101
const hasLocationDefaultValue = locationDefaultValue !== undefined ;
102
102
if ( ! hasNonNullVariableDefaultValue && ! hasLocationDefaultValue ) {
103
103
return false ;
You can’t perform that action at this time.
0 commit comments