Skip to content

Commit eafe4d0

Browse files
committed
refactor(document): update id check for ElasticId instance
- Changed the condition to check if id is an instance of ElasticId
1 parent aa37bdb commit eafe4d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Document.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function toArray(): array
3030
$array['body'] = $this->body->toArray();
3131
}
3232

33-
if ($this->id) {
33+
if ($this->id instanceof \Spameri\Elastic\Entity\Property\ElasticId) {
3434
$array['id'] = $this->id;
3535
}
3636

0 commit comments

Comments
 (0)