You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When passing in a data object, that contains 'url', to the ajax method it extends the params object with the data.
The issue is when 'data' includes a success callback function. The params passed to $.ajax internally include this success function, yet later the success function also gets called in the ok() method, which is called by the done() method.
So the result is my success function firing twice whenever I call eModal.ajax()
It also looks like the error() method suffers the same issue as well, though I was only troubleshooting the success issue
Below is the pertinent code I'm referring to in the ajax method:
When passing in a data object, that contains 'url', to the ajax method it extends the params object with the data.
The issue is when 'data' includes a success callback function. The params passed to
$.ajax
internally include this success function, yet later the success function also gets called in theok()
method, which is called by thedone()
method.So the result is my success function firing twice whenever I call
eModal.ajax()
It also looks like the
error()
method suffers the same issue as well, though I was only troubleshooting thesuccess
issueBelow is the pertinent code I'm referring to in the ajax method:
The text was updated successfully, but these errors were encountered: