Commit 940de449 authored by ale's avatar ale

Prevent infinite recursion

parent 9fe61785
Pipeline #6047 passed with stages
in 5 minutes and 14 seconds
......@@ -34,8 +34,9 @@ var (
type maybeString string
func (s *maybeString) UnmarshalJSON(data []byte) error {
if err := json.Unmarshal(data, s); err != nil {
*s = ""
var tmp string
if err := json.Unmarshal(data, &tmp); err == nil {
*s = maybeString(tmp)
}
return nil
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment