Skip to content

Commit f66cc8f

Browse files
authored
Merge pull request #1325 from rust-lang/compare-fix-links
Preserve selected stat when moving between commits in compare page
2 parents 16f034e + 85270f8 commit f66cc8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

site/static/compare.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -722,10 +722,10 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
722722
return !this.data.is_contiguous;
723723
},
724724
prevLink() {
725-
return `/compare.html?start=${this.data.prev}&end=${this.data.a.commit}`;
725+
return `/compare.html?start=${this.data.prev}&end=${this.data.a.commit}&stat=${this.stat}`;
726726
},
727727
nextLink() {
728-
return `/compare.html?start=${this.data.b.commit}&end=${this.data.next}`;
728+
return `/compare.html?start=${this.data.b.commit}&end=${this.data.next}&stat=${this.stat}`;
729729
},
730730
compareLink() {
731731
return `https://github.com/rust-lang/rust/compare/${this.data.a.commit}...${this.data.b.commit}`;

0 commit comments

Comments
 (0)