summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/repository/components/tree_content.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/repository/components/tree_content.vue')
-rw-r--r--app/assets/javascripts/repository/components/tree_content.vue5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/repository/components/tree_content.vue b/app/assets/javascripts/repository/components/tree_content.vue
index 365b6cbb550..78b8baaa75e 100644
--- a/app/assets/javascripts/repository/components/tree_content.vue
+++ b/app/assets/javascripts/repository/components/tree_content.vue
@@ -75,6 +75,7 @@ export default {
},
methods: {
fetchFiles() {
+ const originalPath = this.path || '/';
this.isLoadingFiles = true;
return this.$apollo
@@ -83,14 +84,14 @@ export default {
variables: {
projectPath: this.projectPath,
ref: this.ref,
- path: this.path || '/',
+ path: originalPath,
nextPageCursor: this.nextPageCursor,
pageSize: this.pageSize,
},
})
.then(({ data }) => {
if (data.errors) throw data.errors;
- if (!data?.project?.repository) return;
+ if (!data?.project?.repository || originalPath !== (this.path || '/')) return;
const pageInfo = this.hasNextPage(data.project.repository.tree);