Skip to content

Commit 4a00155

Browse files
committed
Ensure primary resources are returned in the correct order
1 parent 606a79a commit 4a00155

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Serializer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ private function merge($data): void
242242

243243
public function primary(): array
244244
{
245-
$primary = array_values(array_intersect_key($this->map, array_flip($this->primary)));
245+
$primary = array_map(function ($key) {
246+
return $this->map[$key];
247+
}, $this->primary);
246248

247249
return $this->resourceObjects($primary);
248250
}

0 commit comments

Comments
 (0)