Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
check existance of teamCollectionAdded.parent
Liyas Thomasb8bc110d3355
diff --git a/components/collections/Collection.vue b/components/collections/Collection.vueindex 1d0086306..e1dbd48cd 100644--- a/components/collections/Collection.vue+++ b/components/collections/Collection.vue@@ -110,7 +110,7 @@@click="confirmRemove = true"v-close-popover>- <i class="material-icons">add</i>+ <i class="material-icons">delete</i><span>{{ $t("delete") }}</span></button><button v-else class="icon" @click="confirmRemove = true" v-close-popover>@@ -384,9 +384,12 @@ export default {return { teamID: this.$props.collectionsType.selectedTeam.id }},skip() {- return this.$props.collectionsType.selectedTeam === undefined+ return (+ this.$props.collectionsType.selectedTeam === undefined && this.$props.showChildren+ )},updateQuery(previousResult, { subscriptionData }) {+ debuggerif (subscriptionData.data.teamCollectionAdded.parent &&subscriptionData.data.teamCollectionAdded.parent.id === this.$props.collection.iddiff --git a/components/collections/Folder.vue b/components/collections/Folder.vueindex 8a25608d8..5ab1b3009 100644--- a/components/collections/Folder.vue+++ b/components/collections/Folder.vue@@ -236,7 +236,10 @@ export default {return this.$props.collectionsType.selectedTeam === undefined},updateQuery(previousResult, { subscriptionData }) {- if (subscriptionData.data.teamCollectionAdded.parent.id === this.$props.folder.id) {+ if (+ subscriptionData.data.teamCollectionAdded.parent &&+ subscriptionData.data.teamCollectionAdded.parent.id === this.$props.folder.id+ ) {previousResult.collection.children.push({id: subscriptionData.data.teamCollectionAdded.id,title: subscriptionData.data.teamCollectionAdded.title,@@ -266,7 +269,10 @@ export default {return this.$props.collectionsType.selectedTeam === undefined},updateQuery(previousResult, { subscriptionData }) {- if (subscriptionData.data.teamCollectionUpdated.parent.id === this.$props.folder.id) {+ if (+ subscriptionData.data.teamCollectionUpdated.parent &&+ subscriptionData.data.teamCollectionUpdated.parent.id === this.$props.folder.id+ ) {const index = previousResult.collection.children.findIndex((x) => x.id === subscriptionData.data.teamCollectionUpdated.id)