Skip to content
This repository has been archived by the owner on Nov 20, 2019. It is now read-only.

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
cn0047 committed Jan 3, 2018
1 parent 6d5292f commit 3185c6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const { checkUrl, checkQuery, checkCallback } = require('./validation');
const fetchData = (resourceName, uri, cb) => {
fetch(uri)
.then(res => res.json())
.then(json => cb({ resourceName, data: json }))
.then(json => cb({ resourceName, data: json, error: undefined }))
.catch(err => cb({ resourceName, data: undefined, error: err.message }));
};

Expand Down

0 comments on commit 3185c6a

Please sign in to comment.