Skip to content

Commit ac2c079

Browse files
Merge pull request #4 from code16/fixes
Fixes
2 parents 564fa31 + 178711b commit ac2c079

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Utils/HasBooksAttribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function refreshBooks(bool $force = false): self
3434
public function books(): Attribute
3535
{
3636
return Attribute::make(
37-
get: fn () => collect($this->fromJson($this->attributes['book'] ?? []))
37+
get: fn () => collect($this->fromJson($this->attributes['books'] ?? '[]'))
3838
->whereNotNull()
3939
->map(fn ($attributes) => new Book($attributes))
4040
->values()

0 commit comments

Comments
 (0)