From 7f545267ad5391917a9c72281793267e11015e05 Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Tue, 26 Mar 2024 00:31:41 +0000 Subject: [PATCH] WIP --- src/Data/TaskDetails.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Data/TaskDetails.php b/src/Data/TaskDetails.php index ab5d0bc..fc313f0 100644 --- a/src/Data/TaskDetails.php +++ b/src/Data/TaskDetails.php @@ -13,7 +13,7 @@ public function __construct( public string $description, public string $previewType, public string $id, - public Note $notes, + public ?Note $notes, public Collection $references, public Collection $checklist, ) { @@ -36,7 +36,7 @@ public static function fromData(array $data): self description: Arr::get($data, 'description'), previewType: Arr::get($data, 'previewType'), id: Arr::get($data, 'id'), - notes: Note::fromData(Arr::get($data, 'notes')), + notes: Arr::has($data, 'notes') ? Note::fromData(Arr::get($data, 'notes')) : null, references: $references, checklist: $checklist );