From 41f1ca05ca656de69b54f06ef2fec46dcd01935f Mon Sep 17 00:00:00 2001 From: Robert Mosolgo Date: Wed, 27 Apr 2016 19:20:57 -0400 Subject: [PATCH] fix(GraphiQL) fallback to defaultQuery if there's no stored query --- src/components/GraphiQL.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/GraphiQL.js b/src/components/GraphiQL.js index ddb3caa6898..1d1560cfb98 100644 --- a/src/components/GraphiQL.js +++ b/src/components/GraphiQL.js @@ -132,7 +132,7 @@ export class GraphiQL extends React.Component { // Determine the initial query to display. const query = props.query !== undefined ? props.query : - this._storageGet('query') !== undefined ? this._storageGet('query') : + this._storageGet('query') !== null ? this._storageGet('query') : props.defaultQuery !== undefined ? props.defaultQuery : defaultQuery;