mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-28 11:31:55 +02:00
Clarify logic of asyncform onsuccess and onerror handlers
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user