Clarify logic of asyncform onsuccess and onerror handlers

This commit is contained in:
Shane Kilkelly 2017-01-20 13:52:31 +00:00
parent 8922c9dbf5
commit 36eb453aed

View file

@ -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