Skip to content

Commit

Permalink
add ImageResizeFunc nil validation
Browse files Browse the repository at this point in the history
  • Loading branch information
logica0419 committed Sep 1, 2024
1 parent e6a9b83 commit 9046045
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion options.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ func WithAspectRatio(aspectRatio aspectRatioOption) Option {
// default: using draw.CatmullRom
func WithImageResizeFunc(resizeFunc ImageResizeFunc) Option {
return func(o *processor) {
o.resizeFunc = resizeFunc
if resizeFunc != nil {
o.resizeFunc = resizeFunc
}
}
}

Expand Down

0 comments on commit 9046045

Please sign in to comment.