mirror of
https://github.com/atom/atom.git
synced 2026-02-17 10:01:25 -05:00
Remove unneeded catch and default response to empty hash
This commit is contained in:
@@ -92,12 +92,10 @@ class SignInView extends ScrollView
|
||||
console.warn 'Unable to save GitHub.com token to keychain'
|
||||
@detach()
|
||||
|
||||
error: (response) =>
|
||||
error: (response={}) =>
|
||||
if _.isString(response.responseText)
|
||||
try
|
||||
message = JSON.parse(response.responseText)?.message
|
||||
catch e
|
||||
message = ''
|
||||
else
|
||||
message = response.responseText?.message
|
||||
message ?= ''
|
||||
|
||||
Reference in New Issue
Block a user