Skip to content

Commit 5b7afaf

Browse files
committed
improve resource linkage
1 parent aae7cca commit 5b7afaf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Serializer.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ protected function serializeModel(ResourceInterface $model)
119119
if (in_array($name, $included)) {
120120
$data['relationships'][$name]['data'] = $relationship;
121121
}
122-
}
123-
if ($model instanceof LinksInterface) {
124-
$links = $model->getRelationshipLinks($name);
125-
if (!empty($links)) {
126-
$data['relationships'][$name]['links'] = Link::serialize($links);
122+
if ($model instanceof LinksInterface) {
123+
$links = $model->getRelationshipLinks($name);
124+
if (!empty($links)) {
125+
$data['relationships'][$name]['links'] = Link::serialize($links);
126+
}
127127
}
128128
}
129129
}

0 commit comments

Comments
 (0)