From 00a3efdacd2e85c927b53c326b95a8314550813a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Antonio=20G=C3=B3mez=20Cabo?= Date: Thu, 30 Aug 2018 13:00:53 +0100 Subject: [PATCH] feat: Let the ApolloQuery be a renderless component if `tag` prop is undefined (#365) * Let the ApolloQuery be a renderless component if `tag` prop is undefined * Let the ApolloMutation component be a renderless component if `tag` prop is undefined --- src/components/ApolloMutation.js | 2 +- src/components/ApolloQuery.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ApolloMutation.js b/src/components/ApolloMutation.js index 2076994..eae5644 100644 --- a/src/components/ApolloMutation.js +++ b/src/components/ApolloMutation.js @@ -81,6 +81,6 @@ export default { } else { result = [result].concat(this.$slots.default) } - return h(this.tag, result) + return this.tag ? h(this.tag, result) : result }, } diff --git a/src/components/ApolloQuery.js b/src/components/ApolloQuery.js index 90f442f..b9bcb9f 100644 --- a/src/components/ApolloQuery.js +++ b/src/components/ApolloQuery.js @@ -192,6 +192,6 @@ export default { } else { result = [result].concat(this.$slots.default) } - return h(this.tag, result) + return this.tag ? h(this.tag, result) : result }, }