Merge "Access fetchJSON from restApiHelper in plugin-rest-api"

This commit is contained in:
Dhruv Srivastava
2019-09-09 15:38:23 +00:00
committed by Gerrit Code Review

View File

@@ -51,7 +51,11 @@
};
GrPluginRestApi.prototype.fetchJSON = function(req) {
return getRestApi()._fetchJSON(req);
// TODO(dhruvsri): find better implementation for fetchJSON
const api = getRestApi();
const fetchJSON = api._fetchJSON ||
api._restApiHelper.fetchJSON.bind(api._restApiHelper);
return fetchJSON(req);
};
GrPluginRestApi.prototype.getRepos =