Merge pull request #10250 from ndeloof/nil_build_args

prevent assignment to entry in nil map
This commit is contained in:
Guillaume Lours 2023-02-07 21:13:29 +01:00 committed by GitHub
commit 7daa2a5325
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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