diff --git a/src/behaviors/SnapshotableBehavior.php b/src/behaviors/SnapshotableBehavior.php index 3c53761..640f0a8 100644 --- a/src/behaviors/SnapshotableBehavior.php +++ b/src/behaviors/SnapshotableBehavior.php @@ -29,15 +29,15 @@ public function toSnapshot() return $value; }); - return $customFields->set([ + return $customFields->merge([ 'title' => $this->owner->title, 'enabled' => $this->owner->enabled, 'archived' => $this->owner->archived, 'uri' => $this->owner->uri, 'trashed' => $this->owner->trashed, - 'ref' => $this->owner->ref, - 'status' => $this->owner->status, - 'url' => $this->owner->url, + 'ref' => $this->owner->ref ?? null, + 'status' => $this->owner->status ?? null, + 'url' => $this->owner->url ?? null, ])->all(); } }