Skip to content

Commit c247a44

Browse files
committed
Fix non email present
1 parent b3e9d55 commit c247a44

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bin/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ const REGEX_EMAIL_VARIATIONS = /[.+]/g
2525
const normalizeEmail = email =>
2626
email.toLowerCase().replace(REGEX_EMAIL_VARIATIONS, '')
2727

28-
const isSameEmail = (email1, email2) =>
28+
const isSameEmail = (email1 = '', email2 = '') =>
2929
normalizeEmail(email1) === normalizeEmail(email2)
3030

3131
const processError = err => {
32+
console.log('err', err)
3233
console.log(chalk.red(err.message || err))
3334
process.exit(1)
3435
}
@@ -94,7 +95,7 @@ const getContributors = async () => {
9495

9596
if (stderr) return processError(stderr)
9697

97-
const { author: pkgAuthor } = require(pkgPath)
98+
const { author: pkgAuthor = {} } = require(pkgPath)
9899

99100
const contributors = stdout
100101
.split(EOL)

0 commit comments

Comments
 (0)