Skip to content

Commit dbc254f

Browse files
authored
fix: propagate error if no release is found
`res` may be undefined in case of an error, and the script will cover it up with its own error
1 parent 024aeb0 commit dbc254f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

getLastRelease.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = function (pluginConfig, config, cb) {
2020
}
2121

2222
return defaultLastRelease(pluginConfig, config, function(err, res) {
23-
if (!res.gitHead) {
23+
if (res && !res.gitHead) {
2424
res.gitHead = lastTag();
2525
}
2626

0 commit comments

Comments
 (0)