mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Clarify logic of asyncform onsuccess and onerror handlers
This commit is contained in:
parent
8922c9dbf5
commit
36eb453aed
1 changed files with 4 additions and 2 deletions
|
@ -33,7 +33,8 @@ define [
|
|||
response.success = true
|
||||
response.error = false
|
||||
|
||||
if onSuccessHandler = scope[attrs.onSuccess]
|
||||
onSuccessHandler = scope[attrs.onSuccess]
|
||||
if onSuccessHandler
|
||||
onSuccessHandler(data, status, headers, config)
|
||||
return
|
||||
|
||||
|
@ -55,7 +56,8 @@ define [
|
|||
response.success = false
|
||||
response.error = true
|
||||
|
||||
if onErrorHandler = scope[attrs.onError]
|
||||
onErrorHandler = scope[attrs.onError]
|
||||
if onErrorHandler
|
||||
onErrorHandler(data, status, headers, config)
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in a new issue