Skip to content

Commit 94bb2d7

Browse files
authored
Update Serializer.php
1 parent ee1ea23 commit 94bb2d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/Serializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ protected function normalizeResponse($model)
201201
$this->typeCastClass::cast($type, $attribute['value']);
202202
}
203203

204-
if (is_numeric($i)) {
204+
if (is_numeric($i) && $key) {
205205
$ret[$key] = $this->useModelResponse ? $attribute : $attribute['value'];
206206
} else {
207207
$ret[$i] = $this->useModelResponse ? $attribute : $attribute['value'];

0 commit comments

Comments
 (0)