Fix typo-logic bug in GetPage

This commit is contained in:
Vas Sudanagunta 2018-07-19 14:55:16 -04:00 committed by Bjørn Erik Pedersen
parent d6fde8fa13
commit b56d9a1294

View file

@ -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 {