Skip to content

Commit

Permalink
Fix uncached API v4 output
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Jan 1, 2019
1 parent e37c15c commit dfbffb5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/libs/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ async function call(fetch, query, options = {accept404: false}) {
}

if (response.ok || (options.accept404 === true && response.status === 404)) {
cache.set(query, fetch === fetch4 ? data : result);
return result;
const output = fetch === fetch4 ? data : result;
cache.set(query, output);
return output;
}

throw new RefinedGitHubAPIError(
Expand Down

0 comments on commit dfbffb5

Please sign in to comment.