Fixed RB.apiCall overwriting completed callback function.
Review Request #10745 — Created Oct. 9, 2019 and updated
In the RB.apiCall function, there are options that the caller can pass in,
and these options include callback functions that handle a request completing,
failing, or succeeding. However, the error and completed callback options
ended up overwriting the default request handler functions, while they
should have been called from within those default functions instead.
This patch fixes this issue for the completed callback, but it does
not resolve it for the error callback. It seems like certain parts
of the codebase (such as adding comments to reviews) completely broke when
I tried to resolve it for the error callback. Those issues will need to
be fixed before this patch can be applied for the error callback.
- I tested AJAX calls manually by creating comments on reviews.