Skip to content

Commit

Permalink
adds catch to example promise cache
Browse files Browse the repository at this point in the history
  • Loading branch information
davelandry committed Feb 14, 2023
1 parent 8af74c2 commit 4ff39ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/cache/promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const axios = require("axios");
module.exports = function() {

return axios.get("https://api.dataafrica.io/attrs/geo/")
.then(d => d.data);
.then(d => d.data)
.catch(() => []);

};

0 comments on commit 4ff39ed

Please sign in to comment.