Skip to content

Commit

Permalink
Update ArraySerializer
Browse files Browse the repository at this point in the history
  • Loading branch information
dansup committed Jul 1, 2018
1 parent 9a6712f commit faff10c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Serializer/ArraySerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ArraySerializer extends SerializerAbstract
*/
public function collection($resourceKey, array $data)
{
return [$resourceKey ?: 'data' => $data];
return $resourceKey ? [$resourceKey => $data] : $data;
}

/**
Expand Down

0 comments on commit faff10c

Please sign in to comment.