Skip to content

Commit 8f93cdd

Browse files
committed
fix: fix commit msg for no type
1 parent 980e461 commit 8f93cdd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/commands/git/commit-msg.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ git commit -m"feat(core)!: commit description"
100100
if ( commit.scope ) {
101101

102102
// check strict scope
103-
if ( type.strictScope ) {
103+
if ( type?.strictScope ) {
104104

105105
// commit scope is not valid
106106
if ( !scopes.has( commit.scope ) ) {
@@ -115,7 +115,7 @@ git commit -m"feat(core)!: commit description"
115115
}
116116

117117
// commit scope is required
118-
else if ( type.requireScope && scopes.size ) {
118+
else if ( type?.requireScope && scopes.size ) {
119119
return this.#throwError( "Commit scope is required.", { "types": true } );
120120
}
121121

0 commit comments

Comments
 (0)