Skip to content

Commit 1fbbf94

Browse files
fix(CommitCommand): Replace null with empty string in message
- Replace the null value with an empty string in the message - This change ensures that the message structure remains consistent and avoids issues with null values - Improves overall handling of commit messages in the application
1 parent 6259be7 commit 1fbbf94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Commands/CommitCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function ($attempts) use ($cachedDiff, $type): string {
116116
return $content;
117117
})
118118
->tap(function (Collection $message): void {
119-
$message = $message->put('', null)->sortKeysUsing(static function (string $a, string $b): int {
119+
$message = $message->put('', '')->sortKeysUsing(static function (string $a, string $b): int {
120120
$rules = ['subject', '', 'body'];
121121

122122
return array_search($a, $rules, true) <=> array_search($b, $rules, true);

0 commit comments

Comments
 (0)