소스 검색

Fix too many versions loaded

When scrolling quickly through the date selector, e.g. via switching the month quickly,
the asynchronous fetching could cause too many versions to be loaded
2xB 2 년 전
부모
커밋
c1651caf03
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      archive/archiveviewer.js

+ 5 - 0
archive/archiveviewer.js

@@ -112,6 +112,11 @@ class ArchiveView {
                 )
             )
         ).then((commits) => {
+                // Skip if new date is selected
+                if (date != this.dateselector.value) {
+                    return 0;
+                }
+                
                 this.add_commits(commits)
                 return commits.length
             }