mirror of
https://github.com/gohugoio/hugo.git
synced 2025-05-04 14:11:06 +00:00
Fix typo-logic bug in GetPage
This commit is contained in:
parent
d6fde8fa13
commit
b56d9a1294
1 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Reference in a new issue