From 36bda58b23f4c73a0440920a471ff4c336d5f915 Mon Sep 17 00:00:00 2001 From: sillyguodong Date: Wed, 12 Apr 2023 14:20:28 +0800 Subject: [PATCH 1/3] update `diffend` in the ajax callback --- web_src/js/components/DiffFileTree.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/web_src/js/components/DiffFileTree.vue b/web_src/js/components/DiffFileTree.vue index 9fc08af1fc2f1..155709c0a6e2d 100644 --- a/web_src/js/components/DiffFileTree.vue +++ b/web_src/js/components/DiffFileTree.vue @@ -135,6 +135,7 @@ export default { this.isLoadingNewData = true; doLoadMoreFiles(this.link, this.diffEnd, () => { this.isLoadingNewData = false; + this.diffEnd = window.config.pageData.diffFileInfo.diffEnd }); }, }, From 2f23fc9c4695aa0b2de8e7d1d68d702f49d4bb2e Mon Sep 17 00:00:00 2001 From: sillyguodong Date: Wed, 12 Apr 2023 14:46:07 +0800 Subject: [PATCH 2/3] fix lint --- web_src/js/components/DiffFileTree.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web_src/js/components/DiffFileTree.vue b/web_src/js/components/DiffFileTree.vue index 155709c0a6e2d..4fc0373901c80 100644 --- a/web_src/js/components/DiffFileTree.vue +++ b/web_src/js/components/DiffFileTree.vue @@ -135,7 +135,8 @@ export default { this.isLoadingNewData = true; doLoadMoreFiles(this.link, this.diffEnd, () => { this.isLoadingNewData = false; - this.diffEnd = window.config.pageData.diffFileInfo.diffEnd + const {diffEnd} = window.config.pageData.diffFileInfo + this.diffEnd = diffEnd; }); }, }, From bbbe4f04ddfec74e94a93133348bebfc9b9a06de Mon Sep 17 00:00:00 2001 From: sillyguodong Date: Wed, 12 Apr 2023 20:05:38 +0800 Subject: [PATCH 3/3] fix lint --- web_src/js/components/DiffFileTree.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_src/js/components/DiffFileTree.vue b/web_src/js/components/DiffFileTree.vue index 4fc0373901c80..a1b889bdc86c4 100644 --- a/web_src/js/components/DiffFileTree.vue +++ b/web_src/js/components/DiffFileTree.vue @@ -135,8 +135,8 @@ export default { this.isLoadingNewData = true; doLoadMoreFiles(this.link, this.diffEnd, () => { this.isLoadingNewData = false; - const {diffEnd} = window.config.pageData.diffFileInfo - this.diffEnd = diffEnd; + const {pageData} = window.config; + this.diffEnd = pageData.diffFileInfo.diffEnd; }); }, },