diff options
Diffstat (limited to 'modules/templates')
-rw-r--r-- | modules/templates/helper.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go index 9037af8991..9e1c2fd381 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -470,7 +470,10 @@ var heightRe = regexp.MustCompile(`height="[0-9]+?"`) // SVG render icons - arguments icon name (string), size (int), class (string) func SVG(icon string, others ...interface{}) template.HTML { - var size = others[0].(int) + size := 16 + if len(others) > 0 && others[0].(int) != 0 { + size = others[0].(int) + } class := "" if len(others) > 1 && others[1].(string) != "" { |