Skip to content

Commit

Permalink
check for nil decorator before wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
vbauerster committed Dec 14, 2021
1 parent cabcd4d commit bcd2164
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions decor/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ import (
// +----+--------+---------+--------+
//
func Merge(decorator Decorator, placeholders ...WC) Decorator {
if decorator == nil {
return nil
}
if _, ok := decorator.Sync(); !ok || len(placeholders) == 0 {
return decorator
}
Expand Down

0 comments on commit bcd2164

Please sign in to comment.