prevent assignment to entry in nil map
@@ -303,10 +303,10 @@ func (s *composeService) toBuildOptions(project *types.Project, service types.Se
}
func flatten(in types.MappingWithEquals) types.Mapping {
+ out := types.Mapping{}
if len(in) == 0 {
- return nil
+ return out
- out := types.Mapping{}
for k, v := range in {
if v == nil {
continue