diff --git a/.gitignore b/.gitignore index 0d28d5f..41f15ad 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,6 @@ coverage yarn.lock coverage.lcov -package-lock.json \ No newline at end of file +package-lock.json + +output.json diff --git a/package.json b/package.json index 4d91be1..00bc337 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "3.0.0", + "version": "3.0.1", "name": "feed-reader", "description": "Parse ATOM/RSS data from given feed url", "homepage": "https://www.npmjs.com/package/feed-reader", @@ -29,7 +29,7 @@ }, "devDependencies": { "jest": "^27.3.1", - "nock": "^13.1.4" + "nock": "^13.2.1" }, "keywords": [ "extractor", diff --git a/src/utils/retrieve.js b/src/utils/retrieve.js index 2a6e7d8..84ac36d 100644 --- a/src/utils/retrieve.js +++ b/src/utils/retrieve.js @@ -19,7 +19,7 @@ module.exports = async (url) => { } const contentType = res.headers['content-type'] || '' - if (!contentType || !contentType.includes('/xml')) { + if (!contentType || !contentType.includes('xml')) { error(`Got invalid content-type (${contentType}) from "${url}"`) return null }