Duplicate javascript ajax:complete event does not have access to request/response

Xon

Well-known member
Affected version
2.3.0
The event ajax:complete triggered by AJAX calls appears to be significantly broken, as the response/data/error is undefined values despite the resulting event expecting that data.

Code:
                .finally(({
                    response,
                    data,
                    error,
                } = {}) =>
                {
                    if (global)
                    {
                        XF.trigger(document, 'xf:action-stop')
                    }

                    XF.trigger(document, XF.customEvent('ajax:complete', {
                        request,
                        response,
                        status: response?.status,
                        data,
                        error,
                    }))
                })
 
Back
Top Bottom