From 597fd2c6d1e73d8581ccf2048cb81d2cbbcbbdd9 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Thu, 29 Apr 2021 23:50:50 -0400 Subject: [PATCH] Fix duplication on teams folder creation --- components/collections/index.vue | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/components/collections/index.vue b/components/collections/index.vue index 96e2036d..ec3e62a2 100644 --- a/components/collections/index.vue +++ b/components/collections/index.vue @@ -221,11 +221,17 @@ export default { return this.collectionsType.selectedTeam == undefined }, result({ data }) { - this.teamCollections[this.collectionsType.selectedTeam.id].push({ - id: data.teamCollectionAdded.id, - title: data.teamCollectionAdded.title, - __typename: data.teamCollectionAdded.__typename, - }) + console.log(data) + + if (data.teamCollectionAdded.parent == null) { + debugger + + this.teamCollections[this.collectionsType.selectedTeam.id].push({ + id: data.teamCollectionAdded.id, + title: data.teamCollectionAdded.title, + __typename: data.teamCollectionAdded.__typename, + }) + } }, }, teamsCollectionUpdated: {