shithub: hugo

Download patch

ref: b56d9a1294e692d096bff442e0b1fec61a8c2b0f
parent: d6fde8fa131f3852fa98a8ec5c360e736486cf54
author: Vas Sudanagunta <[email protected]>
date: Thu Jul 19 10:55:16 EDT 2018

Fix typo-logic bug in GetPage

--- a/hugolib/page_collections.go
+++ b/hugolib/page_collections.go
@@ -221,7 +221,7 @@
 
 	// 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 @@
 		return nil, fmt.Errorf("failed to resolve page: %s", err)
 	}
 
-	return context, nil
+	return p, nil
 }
 
 func (*PageCollections) findPagesByKindIn(kind string, inPages Pages) Pages {