From 4ff39ed38761db2bee000481db64f010c45a5a99 Mon Sep 17 00:00:00 2001 From: Dave Landry Date: Tue, 14 Feb 2023 13:44:08 -0500 Subject: [PATCH] adds catch to example promise cache --- examples/cache/promise.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/cache/promise.js b/examples/cache/promise.js index 42ced3df1..bef02153d 100644 --- a/examples/cache/promise.js +++ b/examples/cache/promise.js @@ -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(() => []); };