Skip to content

Commit 86da6f8

Browse files
committed
Add the id when the item has one and not only when it is not new
1 parent 4178c3d commit 86da6f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Item.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function toJsonApiArray(): array
5555
'type' => $this->getType(),
5656
];
5757

58-
if (!$this->isNew()) {
58+
if ($this->hasId()) {
5959
$data['id'] = $this->getId();
6060
}
6161

0 commit comments

Comments
 (0)