mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
parent
cd6a261242
commit
236f0c840b
1 changed files with 1 additions and 2 deletions
|
@ -86,8 +86,7 @@ func (scp *ShortcodeWithPage) Get(key interface{}) interface{} {
|
|||
idx := int(reflect.ValueOf(key).Int())
|
||||
ln := reflect.ValueOf(scp.Params).Len()
|
||||
if idx > ln-1 {
|
||||
helpers.DistinctErrorLog.Printf("No shortcode param at .Get %d in page %s, have params: %v", idx, scp.Page.FullFilePath(), scp.Params)
|
||||
return fmt.Sprintf("error: index out of range for positional param at position %d", idx)
|
||||
return ""
|
||||
}
|
||||
x = reflect.ValueOf(scp.Params).Index(idx)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue