Skip to content

Commit

Permalink
Pass null as tabs when no query and enpoint were provided
Browse files Browse the repository at this point in the history
  • Loading branch information
maarcingebala committed Feb 21, 2020
1 parent 8116932 commit 30c0df6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/graphql/playground.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
const root = document.getElementById("root");
const endpoint = root.dataset.endpoint;
const query = root.dataset.query;
const tabs = [{ endpoint, query }];
const tabs = query && endpoint ? [{ endpoint, query }] : null;
GraphQLPlayground.init(root, { settings, tabs });
})</script>
</body>
Expand Down

0 comments on commit 30c0df6

Please sign in to comment.