forked from Silverfish/proton-bridge
fix: don't select multipart/alternative if length is 0
This commit is contained in:
@ -250,6 +250,10 @@ func bestChoice(childParts []parser.Parts, preferredContentType string) parser.P
|
|||||||
}
|
}
|
||||||
|
|
||||||
func allPartsHaveContentType(parts parser.Parts, contentType string) bool {
|
func allPartsHaveContentType(parts parser.Parts, contentType string) bool {
|
||||||
|
if len(parts) == 0 {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
for _, part := range parts {
|
for _, part := range parts {
|
||||||
t, _, err := part.Header.ContentType()
|
t, _, err := part.Header.ContentType()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user