diff options
Diffstat (limited to 'app/assets/javascripts/users.js')
-rw-r--r-- | app/assets/javascripts/users.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/users.js b/app/assets/javascripts/users.js index 3dae526..4b5198f 100644 --- a/app/assets/javascripts/users.js +++ b/app/assets/javascripts/users.js @@ -151,11 +151,11 @@ } function extractErrors(message) { - if ($.isPlainObject(message) && message.errors) { - return message.errors; + if ($.isPlainObject(message)) { + return message.errors || { base: message.error }; } else { return { - base: (message.error || JSON.stringify(message)) + base: message }; } } |