Fix typo-logic bug in GetPage - hugo - [fork] hugo port for 9front
(HTM) git clone git@git.drkhsh.at/hugo.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
(DIR) commit b56d9a1294e692d096bff442e0b1fec61a8c2b0f
(DIR) parent d6fde8fa131f3852fa98a8ec5c360e736486cf54
(HTM) Author: Vas Sudanagunta <vas@commonkarma.org>
Date: Thu, 19 Jul 2018 14:55:16 -0400
Fix typo-logic bug in GetPage
Diffstat:
M hugolib/page_collections.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/hugolib/page_collections.go b/hugolib/page_collections.go
@@ -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 {