mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05: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.
|
||||
ref = strings.TrimPrefix(ref, "/")
|
||||
context, err := c.getFromCache(ref)
|
||||
p, err := c.getFromCache(ref)
|
||||
|
||||
if err != 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 context, nil
|
||||
return p, nil
|
||||
}
|
||||
|
||||
func (*PageCollections) findPagesByKindIn(kind string, inPages Pages) Pages {
|
||||
|
|
Loading…
Reference in a new issue