hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit b56d9a1294e692d096bff442e0b1fec61a8c2b0f
parent d6fde8fa131f3852fa98a8ec5c360e736486cf54
Author: Vas Sudanagunta <vas@commonkarma.org>
Date:   Thu, 19 Jul 2018 14:55:16 -0400

Fix typo-logic bug in GetPage

Diffstat:
Mhugolib/page_collections.go | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 {