mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 05:06:51 +00:00
fix: panic when no params available
This commit is contained in:
@ -75,7 +75,11 @@ func (p *Part) ConvertToUTF8() error {
|
||||
}
|
||||
|
||||
// HELP: Is this okay? What about when the charset is embedded in structured text type eg html/xml?
|
||||
if params == nil {
|
||||
params = make(map[string]string)
|
||||
}
|
||||
params["charset"] = "utf-8"
|
||||
|
||||
p.Header.SetContentType(t, params)
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user