Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'resources/page/weighted.go')
-rw-r--r--resources/page/weighted.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/resources/page/weighted.go b/resources/page/weighted.go
index b2fc8b67b..7e5e25451 100644
--- a/resources/page/weighted.go
+++ b/resources/page/weighted.go
@@ -99,7 +99,7 @@ func (wp WeightedPages) Pages() Pages {
// this weighted page set.
func (wp WeightedPages) Next(cur Page) Page {
for x, c := range wp {
- if c.Page == cur {
+ if c.Page.Eq(cur) {
if x == 0 {
return nil
}
@@ -113,7 +113,7 @@ func (wp WeightedPages) Next(cur Page) Page {
// this weighted page set.
func (wp WeightedPages) Prev(cur Page) Page {
for x, c := range wp {
- if c.Page == cur {
+ if c.Page.Eq(cur) {
if x < len(wp)-1 {
return wp[x+1].Page
}