diff options
Diffstat (limited to 'vendor/github.com/mattermost/mattermost-server/v5/model/preferences.go')
-rw-r--r-- | vendor/github.com/mattermost/mattermost-server/v5/model/preferences.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vendor/github.com/mattermost/mattermost-server/v5/model/preferences.go b/vendor/github.com/mattermost/mattermost-server/v5/model/preferences.go index 6ed845b6..c2d24865 100644 --- a/vendor/github.com/mattermost/mattermost-server/v5/model/preferences.go +++ b/vendor/github.com/mattermost/mattermost-server/v5/model/preferences.go @@ -19,9 +19,8 @@ func PreferencesFromJson(data io.Reader) (Preferences, error) { decoder := json.NewDecoder(data) var o Preferences err := decoder.Decode(&o) - if err == nil { - return o, nil - } else { + if err != nil { return nil, err } + return o, nil } |