Skip to content

Commit 5656809

Browse files
committed
Update JsonApiTransformer.php
1 parent 7e85b9c commit 5656809

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JsonApiTransformer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ protected function setResponseLinks(array $value, array &$data)
125125
if (!empty($value[Serializer::CLASS_IDENTIFIER_KEY])) {
126126
$type = $value[Serializer::CLASS_IDENTIFIER_KEY];
127127

128-
if (\is_scalar($type)) {
128+
if (\is_scalar($type) && !empty($this->mappings[$type])) {
129129
$urls = $this->mappings[$type]->getUrls();
130130

131131
$data[self::LINKS_KEY] = \array_filter(

0 commit comments

Comments
 (0)