diff options
Diffstat (limited to 'identity/common.go')
-rw-r--r-- | identity/common.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/identity/common.go b/identity/common.go index 2f2b90425..68a6d57cc 100644 --- a/identity/common.go +++ b/identity/common.go @@ -37,11 +37,11 @@ func UnmarshalJSON(raw json.RawMessage) (Interface, error) { } // Fallback on a legacy Bare identity - var b Bare + b := &Bare{} - err = json.Unmarshal(raw, &b) + err = json.Unmarshal(raw, b) if err == nil && (b.name != "" || b.login != "") { - return &b, nil + return b, nil } // abort if we have an error other than the wrong type |