mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-23 21:53:09 +02:00
Fix typo-logic bug in GetPage
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
d6fde8fa13
commit
b56d9a1294
@@ -221,7 +221,7 @@ func (c *PageCollections) getPageNew(context *Page, ref string) (*Page, error) {
|
|||||||
|
|
||||||
// Last try.
|
// Last try.
|
||||||
ref = strings.TrimPrefix(ref, "/")
|
ref = strings.TrimPrefix(ref, "/")
|
||||||
context, err := c.getFromCache(ref)
|
p, err := c.getFromCache(ref)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if context != nil {
|
if context != nil {
|
||||||
@@ -230,7 +230,7 @@ func (c *PageCollections) getPageNew(context *Page, ref string) (*Page, error) {
|
|||||||
return nil, fmt.Errorf("failed to resolve page: %s", err)
|
return nil, fmt.Errorf("failed to resolve page: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return context, nil
|
return p, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*PageCollections) findPagesByKindIn(kind string, inPages Pages) Pages {
|
func (*PageCollections) findPagesByKindIn(kind string, inPages Pages) Pages {
|
||||||
|
Reference in New Issue
Block a user