Skip to content

Commit

Permalink
Add the id when the item has one and not only when it is not new
Browse files Browse the repository at this point in the history
  • Loading branch information
JaZo committed Sep 25, 2018
1 parent 4178c3d commit 86da6f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function toJsonApiArray(): array
'type' => $this->getType(),
];

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

Expand Down

0 comments on commit 86da6f8

Please sign in to comment.