Skip to content
This repository was archived by the owner on Oct 29, 2025. It is now read-only.

Commit c49eea4

Browse files
authored
Merge pull request #18 from codebar-ag/fix-null-data-notes
Fix Null Notes
2 parents cffa2ed + 7f54526 commit c49eea4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Data/TaskDetails.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function __construct(
1313
public string $description,
1414
public string $previewType,
1515
public string $id,
16-
public Note $notes,
16+
public ?Note $notes,
1717
public Collection $references,
1818
public Collection $checklist,
1919
) {
@@ -36,7 +36,7 @@ public static function fromData(array $data): self
3636
description: Arr::get($data, 'description'),
3737
previewType: Arr::get($data, 'previewType'),
3838
id: Arr::get($data, 'id'),
39-
notes: Note::fromData(Arr::get($data, 'notes')),
39+
notes: Arr::has($data, 'notes') ? Note::fromData(Arr::get($data, 'notes')) : null,
4040
references: $references,
4141
checklist: $checklist
4242
);

0 commit comments

Comments
 (0)