Skip to content

Commit 989b8b7

Browse files
Merge pull request #58 from teodino93/patch-1
Fix "Call to a member function filamentComments() on null"
2 parents 083bec1 + 0da7069 commit 989b8b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Actions/CommentsAction.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ protected function setUp(): void
2222
->hiddenLabel()
2323
->icon(config('filament-comments.icons.action'))
2424
->color('gray')
25-
->badge($this->record->filamentComments()->count())
25+
->badge(fn (Model $record): int => $record->filamentComments()->count())
2626
->slideOver()
2727
->modalContentFooter(fn (): View => view('filament-comments::component'))
2828
->modalHeading(__('filament-comments::filament-comments.modal.heading'))

0 commit comments

Comments
 (0)