Skip to content

Commit f5d5f80

Browse files
committed
fix: 如果一开始项目没有tag的时候,报错找不到tag
1 parent 5064138 commit f5d5f80

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/splitCommitByTag.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,9 @@ module.exports = function splitCommitByTag(commits) {
4747
}));
4848
}
4949

50+
if (!result.length) {
51+
result.push(commitObject);
52+
}
53+
5054
return result;
5155
};

0 commit comments

Comments
 (0)