mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
parent
47e65c4acd
commit
28020f866b
1 changed files with 4 additions and 4 deletions
|
@ -59,16 +59,16 @@ func (c *pageCache) get(key string, p Pages, apply func(p Pages)) (Pages, bool)
|
|||
|
||||
pagesCopy := append(Pages(nil), p...)
|
||||
|
||||
if apply != nil {
|
||||
apply(pagesCopy)
|
||||
}
|
||||
|
||||
if v, ok := c.m[key]; ok {
|
||||
c.m[key] = append(v, [2]Pages{p, pagesCopy})
|
||||
} else {
|
||||
c.m[key] = [][2]Pages{[2]Pages{p, pagesCopy}}
|
||||
}
|
||||
|
||||
if apply != nil {
|
||||
apply(pagesCopy)
|
||||
}
|
||||
|
||||
return pagesCopy, false
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue