Skip to content

Commit fb41469

Browse files
author
Travis CI
committed
Deploy b1a39de to NPM branch
1 parent 46c74a4 commit fb41469

File tree

7 files changed

+14
-13
lines changed

7 files changed

+14
-13
lines changed

execution/values.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ function getArgumentValues(def, node, variableValues) {
160160

161161
if (argumentNode && argumentNode.value.kind === _kinds.Kind.VARIABLE) {
162162
var variableName = argumentNode.value.name.value;
163-
hasValue = variableValues && hasOwnProperty(variableValues, variableName);
164-
isNull = variableValues && variableValues[variableName] === null;
163+
hasValue = variableValues != null && hasOwnProperty(variableValues, variableName);
164+
isNull = variableValues != null && variableValues[variableName] === null;
165165
} else {
166166
hasValue = argumentNode != null;
167-
isNull = argumentNode && argumentNode.value.kind === _kinds.Kind.NULL;
167+
isNull = argumentNode != null && argumentNode.value.kind === _kinds.Kind.NULL;
168168
}
169169

170170
if (!hasValue && argDef.defaultValue !== undefined) {

execution/values.js.flow

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,12 @@ export function getArgumentValues(
146146
let isNull;
147147
if (argumentNode && argumentNode.value.kind === Kind.VARIABLE) {
148148
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;
151152
} else {
152153
hasValue = argumentNode != null;
153-
isNull = argumentNode && argumentNode.value.kind === Kind.NULL;
154+
isNull = argumentNode != null && argumentNode.value.kind === Kind.NULL;
154155
}
155156

156157
if (!hasValue && argDef.defaultValue !== undefined) {

execution/values.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ export function getArgumentValues(def, node, variableValues) {
137137

138138
if (argumentNode && argumentNode.value.kind === Kind.VARIABLE) {
139139
var variableName = argumentNode.value.name.value;
140-
hasValue = variableValues && hasOwnProperty(variableValues, variableName);
141-
isNull = variableValues && variableValues[variableName] === null;
140+
hasValue = variableValues != null && hasOwnProperty(variableValues, variableName);
141+
isNull = variableValues != null && variableValues[variableName] === null;
142142
} else {
143143
hasValue = argumentNode != null;
144-
isNull = argumentNode && argumentNode.value.kind === Kind.NULL;
144+
isNull = argumentNode != null && argumentNode.value.kind === Kind.NULL;
145145
}
146146

147147
if (!hasValue && argDef.defaultValue !== undefined) {

language/blockString.js.flow

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function isBlank(str) {
8080
export function printBlockString(
8181
value: string,
8282
indentation?: string = '',
83-
preferMultipleLines?: ?boolean = false,
83+
preferMultipleLines?: boolean = false,
8484
): string {
8585
const isSingleLine = value.indexOf('\n') === -1;
8686
const hasLeadingSpace = value[0] === ' ' || value[0] === '\t';

validation/rules/VariablesInAllowedPosition.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function VariablesInAllowedPosition(context) {
102102

103103
function allowedVariableUsage(schema, varType, varDefaultValue, locationType, locationDefaultValue) {
104104
if ((0, _definition.isNonNullType)(locationType) && !(0, _definition.isNonNullType)(varType)) {
105-
var hasNonNullVariableDefaultValue = varDefaultValue && varDefaultValue.kind !== _kinds.Kind.NULL;
105+
var hasNonNullVariableDefaultValue = varDefaultValue != null && varDefaultValue.kind !== _kinds.Kind.NULL;
106106
var hasLocationDefaultValue = locationDefaultValue !== undefined;
107107

108108
if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) {

validation/rules/VariablesInAllowedPosition.js.flow

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function allowedVariableUsage(
9797
): boolean {
9898
if (isNonNullType(locationType) && !isNonNullType(varType)) {
9999
const hasNonNullVariableDefaultValue =
100-
varDefaultValue && varDefaultValue.kind !== Kind.NULL;
100+
varDefaultValue != null && varDefaultValue.kind !== Kind.NULL;
101101
const hasLocationDefaultValue = locationDefaultValue !== undefined;
102102
if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) {
103103
return false;

validation/rules/VariablesInAllowedPosition.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export function VariablesInAllowedPosition(context) {
8484

8585
function allowedVariableUsage(schema, varType, varDefaultValue, locationType, locationDefaultValue) {
8686
if (isNonNullType(locationType) && !isNonNullType(varType)) {
87-
var hasNonNullVariableDefaultValue = varDefaultValue && varDefaultValue.kind !== Kind.NULL;
87+
var hasNonNullVariableDefaultValue = varDefaultValue != null && varDefaultValue.kind !== Kind.NULL;
8888
var hasLocationDefaultValue = locationDefaultValue !== undefined;
8989

9090
if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) {

0 commit comments

Comments
 (0)