Skip to content

Commit

Permalink
Merge 5943d84 into 8f00c66
Browse files Browse the repository at this point in the history
  • Loading branch information
Oanh Nguyen committed Jun 20, 2017
2 parents 8f00c66 + 5943d84 commit b944558
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Fractal.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ public function data($dataType, $data, $transformer = null)
*/
protected function determineDataType($data)
{
if (is_null($data)) {
return 'NullResource';
}

if (is_array($data)) {
return 'collection';
}
Expand Down

0 comments on commit b944558

Please sign in to comment.