Skip to content

Commit

Permalink
Merge pull request #59 from imdario/fix/pr-58
Browse files Browse the repository at this point in the history
Fix PR #58
  • Loading branch information
darccio committed Jan 19, 2018
2 parents 23348d6 + eff0969 commit 163f413
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions merge.go
Expand Up @@ -54,14 +54,8 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co
visited[h] = &visit{addr, typ, seen}
}

if config.transformers != nil {
if config.transformers != nil && !isEmptyValue(dst) {
if fn := config.transformers.Transformer(dst.Type()); fn != nil {
if isEmptyValue(dst) {
if dst.CanSet() && !isEmptyValue(src) {
dst.Set(src)
}
return
}
err = fn(dst, src)
return
}
Expand Down

0 comments on commit 163f413

Please sign in to comment.