Skip to content
Permalink
Browse files

hugolib: Change to output non-panic error message if missing shortcod…

…e template

A panic occurred when the `nested` variable was nil.
Changed to check if the `nested` variable is nil.

Fixes #6075
  • Loading branch information...
vazrupe authored and bep committed Aug 19, 2019
1 parent 3ae4b3e commit fd3d90ced85baaf6941be45b2fe29c25ff755c18
Showing with 2 additions and 1 deletion.
  1. +2 −1 hugolib/shortcode.go
@@ -473,9 +473,10 @@ Loop:
pt.Backup()
nested, err := s.extractShortcode(nestedOrdinal, nextLevel, pt)
nestedOrdinal++
if nested.name != "" {
if nested != nil && nested.name != "" {
s.nameSet[nested.name] = true
}

if err == nil {
sc.inner = append(sc.inner, nested)
} else {

0 comments on commit fd3d90c

Please sign in to comment.
You can’t perform that action at this time.