Fixed RB.apiCall overwriting completed callback function.

Review Request #10745 — Created Oct. 9, 2019 and updated

Information

Review Board
master

Reviewers

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.

  1. I ran the JavaScript unit tests.
  2. I tested AJAX calls manually by creating comments on reviews.
Summary ID Author
Fixed RB.apiCall overwriting completed callback function.
9dab090dd574134d839023b8a22f591950384681 amalik2
Checks run (2 succeeded)
flake8 passed.
JSHint passed.
brennie
  1. Ship It!
  2. 
      
Loading...