don't merge if there are no placeholders
Vladimir Bauer
7 years ago
| 14 | 14 |
// +--------+---------+
|
| 15 | 15 |
//
|
| 16 | 16 |
func Merge(decorator Decorator, placeholders ...WC) Decorator {
|
| 17 | |
if _, ok := decorator.Sync(); !ok {
|
|
17 |
if _, ok := decorator.Sync(); !ok || len(placeholders) == 0 {
|
| 18 | 18 |
return decorator
|
| 19 | 19 |
}
|
| 20 | 20 |
md := &MergeDecorator{Decorator: decorator}
|