Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Pass null as tabs when no query and enpoint were provided

Marcin Gębala30c0df6355f7
diff --git a/templates/graphql/playground.html b/templates/graphql/playground.html
index c089ea1b86..8402d63975 100644
--- a/templates/graphql/playground.html
+++ b/templates/graphql/playground.html
@@ -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>