Skip to content

Commit 7eeb046

Browse files
fix the trivial bug where previous button can be missing on the second page when viewing diffs; (#761)
Fix a trivial bug, where when create diff UI views through the HollowDiffUIServer, the "previous" button can be missing when viewing diffs.
1 parent 02e5b5b commit 7eeb046

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

hollow-diff-ui/src/main/resources/diff-field.vm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</a><br/>
2323
#end
2424

25-
#if($previousDiffPairPageBeginIdx)
25+
#if($previousDiffPairPageBeginIdx >= 0)
2626
<a href="$path/fielddiff?type=$typeDiff.getTypeName()&fieldIdx=$fieldIdx&diffPairBeginIdx=$previousDiffPairPageBeginIdx#objectDiffs">&lt;&lt; Previous</a>
2727
#end
2828
#if($nextDiffPairPageBeginIdx)

hollow-diff-ui/src/main/resources/diff-type.vm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Number of Fields With Diffs: $typeDiff.getFieldDiffs().size() <br/>
5353
</a><br/>
5454
#end
5555

56-
#if($previousDiffPairPageBeginIdx)
56+
#if($previousDiffPairPageBeginIdx >= 0)
5757
<a href="$path/typediff?type=$typeDiff.getTypeName()&diffPairBeginIdx=$previousDiffPairPageBeginIdx#objectDiffs">&lt;&lt; Previous</a>
5858
#end
5959
#if($nextDiffPairPageBeginIdx)
@@ -76,7 +76,7 @@ Number of Fields With Diffs: $typeDiff.getFieldDiffs().size() <br/>
7676
$object.getDisplayKey()
7777
</a><br/>
7878
#end
79-
#if($previousUnmatchedFromPageBeginIdx)
79+
#if($previousUnmatchedFromPageBeginIdx >= 0)
8080
<a href="$path/typediff?type=$typeDiff.getTypeName()&unmatchedFromBeginIdx=$previousUnmatchedFromPageBeginIdx#unmatchedObjects">&lt;&lt; Previous</a>
8181
#end
8282
#if($nextUnmatchedFromPageBeginIdx)
@@ -90,7 +90,7 @@ Number of Fields With Diffs: $typeDiff.getFieldDiffs().size() <br/>
9090
$object.getDisplayKey()
9191
</a><br/>
9292
#end
93-
#if($previousUnmatchedToPageBeginIdx)
93+
#if($previousUnmatchedToPageBeginIdx >= 0)
9494
<a href="$path/typediff?type=$typeDiff.getTypeName()&unmatchedToBeginIdx=$previousUnmatchedToPageBeginIdx#unmatchedObjects">&lt;&lt; Previous</a>
9595
#end
9696
#if($nextUnmatchedToPageBeginIdx)

0 commit comments

Comments
 (0)