Add binding to _fetchJSON call
Change-Id: I4f9ad7d7de2795aa4ec5e4a36aa59a001c7640f4
This commit is contained in:
@@ -53,8 +53,12 @@
|
||||
GrPluginRestApi.prototype.fetchJSON = function(req) {
|
||||
// TODO(dhruvsri): find better implementation for fetchJSON
|
||||
const api = getRestApi();
|
||||
const fetchJSON = api._fetchJSON ||
|
||||
api._restApiHelper.fetchJSON.bind(api._restApiHelper);
|
||||
let fetchJSON;
|
||||
if (api._fetchJSON) {
|
||||
fetchJSON = api._fetchJSON.bind(api);
|
||||
} else {
|
||||
fetchJSON = api._restApiHelper.fetchJSON.bind(api._restApiHelper);
|
||||
}
|
||||
return fetchJSON(req);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user