mirror of https://github.com/docker/compose.git
prevent assignment to entry in nil map
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
9a4e74c70c
commit
93bffd9a7f
|
@ -303,10 +303,10 @@ func (s *composeService) toBuildOptions(project *types.Project, service types.Se
|
|||
}
|
||||
|
||||
func flatten(in types.MappingWithEquals) types.Mapping {
|
||||
if len(in) == 0 {
|
||||
return nil
|
||||
}
|
||||
out := types.Mapping{}
|
||||
if len(in) == 0 {
|
||||
return out
|
||||
}
|
||||
for k, v := range in {
|
||||
if v == nil {
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue