hugolib: Use the interface value when doing Related search
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 14 Aug 2018 16:19:45 +0000 (18:19 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 14 Aug 2018 16:19:45 +0000 (18:19 +0200)
Currently it makes no practical difference, but this is more a protection if we in the future creates index from the content related fields. That will not work from a shortcode.

See #5071

hugolib/pages_related.go

index 03abf0a581048ff0401a3ca5412667c21cc3c6ba..665019bb4a5392fd73d86fda4fa6c1e64aac0f84 100644 (file)
@@ -73,7 +73,7 @@ func (p Pages) RelatedIndices(doc related.Document, indices ...interface{}) (Pag
                return nil, err
        }
 
-       result, err := p.searchDoc(page, indicesStr...)
+       result, err := p.searchDoc(doc, indicesStr...)
        if err != nil {
                return nil, err
        }