Fix bug unmarshaling custom duration values

This commit is contained in:
Matthew Holt 2019-05-29 23:09:51 -06:00
parent bf54615efc
commit 2265db9028

View file

@ -157,8 +157,7 @@ func (d *Duration) UnmarshalJSON(b []byte) error {
if err != nil { if err != nil {
return err return err
} }
cd := Duration(dd) *d = Duration(dd)
d = &cd
return nil return nil
} }