mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 08:15:37 +00:00
hugolib: Change to output non-panic error message if missing shortcode template
A panic occurred when the `nested` variable was nil. Changed to check if the `nested` variable is nil. Fixes #6075
This commit is contained in:
1 parent
3ae4b3e19f
commit
fd3d90ced8
1 file changed
+2
-1
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user