Skip to content

Commit 0a81cb9

Browse files
author
cg33
committed
update
1 parent 9309ace commit 0a81cb9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

template/types/display/image.go

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ func init() {
1717
func (image *Image) Get(ctx *context.Context, args ...interface{}) types.FieldFilterFn {
1818
param := args[2].([]string)
1919
return func(value types.FieldModel) interface{} {
20+
if value.Value == "" {
21+
return ""
22+
}
2023
if len(param) > 0 {
2124
return template.Default(ctx).Image().SetWidth(args[0].(string)).SetHeight(args[1].(string)).
2225
SetSrc(template.HTML(param[0] + value.Value)).GetContent()

0 commit comments

Comments
 (0)