Skip to content

Commit 014f2c8

Browse files
authored
Merge pull request #100 from pkgjs/fix-404
2 parents b0fb895 + 640f93b commit 014f2c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/github.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports.getPackageJson = async function getPackageJson (owner, repo) {
2424
})
2525
return (JSON.parse(resp.repository.object.text))
2626
} catch (err) {
27-
if (err.errors && err.errors[0].type === 'NOT_FOUND') {
27+
if (err.status === 404) {
2828
throw Error(`Could not find GitHub repository at https://www.github.com/${owner}/${repo}`)
2929
} else {
3030
throw err

0 commit comments

Comments
 (0)