Skip to content

Commit

Permalink
fix: propagate error if no release is found
Browse files Browse the repository at this point in the history
`res` may be undefined in case of an error, and the script will cover it up with its own error
  • Loading branch information
gyoshev authored Jun 29, 2017
1 parent 024aeb0 commit dbc254f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion getLastRelease.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = function (pluginConfig, config, cb) {
}

return defaultLastRelease(pluginConfig, config, function(err, res) {
if (!res.gitHead) {
if (res && !res.gitHead) {
res.gitHead = lastTag();
}

Expand Down

0 comments on commit dbc254f

Please sign in to comment.