fix(changelog): Check that err.message exists

This commit is contained in:
Rhys Arkins 2017-07-19 08:46:00 +02:00
parent 30155782f5
commit cadc148cd0

View file

@ -17,8 +17,9 @@ async function getChangeLogJSON(depName, fromVersion, newVersion, logger) {
return await changelog.generate(depName, semverString);
} catch (err) {
if (
err.message.indexOf('did not specify the repository url') !== -1 ||
err.message.indexOf('Unknown Github Repo') !== -1
err.message &&
(err.message.indexOf('did not specify the repository url') !== -1 ||
err.message.indexOf('Unknown Github Repo') !== -1)
) {
logger.debug({ err }, `getChangeLogJSON error`);
} else {