diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-rest-api.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-rest-api.js index e885bd41e2..fb8a66ca66 100644 --- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-rest-api.js +++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-rest-api.js @@ -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 =