aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/page__menus.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/page__menus.go')
-rw-r--r--hugolib/page__menus.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/hugolib/page__menus.go b/hugolib/page__menus.go
index 49d392c2f..5bed2bc03 100644
--- a/hugolib/page__menus.go
+++ b/hugolib/page__menus.go
@@ -14,6 +14,7 @@
package hugolib
import (
+ "context"
"sync"
"github.com/gohugoio/hugo/navigation"
@@ -29,13 +30,13 @@ type pageMenus struct {
}
func (p *pageMenus) HasMenuCurrent(menuID string, me *navigation.MenuEntry) bool {
- p.p.s.init.menus.Do()
+ p.p.s.init.menus.Do(context.Background())
p.init()
return p.q.HasMenuCurrent(menuID, me)
}
func (p *pageMenus) IsMenuCurrent(menuID string, inme *navigation.MenuEntry) bool {
- p.p.s.init.menus.Do()
+ p.p.s.init.menus.Do(context.Background())
p.init()
return p.q.IsMenuCurrent(menuID, inme)
}
@@ -43,7 +44,7 @@ func (p *pageMenus) IsMenuCurrent(menuID string, inme *navigation.MenuEntry) boo
func (p *pageMenus) Menus() navigation.PageMenus {
// There is a reverse dependency here. initMenus will, once, build the
// site menus and update any relevant page.
- p.p.s.init.menus.Do()
+ p.p.s.init.menus.Do(context.Background())
return p.menus()
}