There was an error while loading. Please reload this page.
1 parent ee1ea23 commit 94bb2d7Copy full SHA for 94bb2d7
src/components/Serializer.php
@@ -201,7 +201,7 @@ protected function normalizeResponse($model)
201
$this->typeCastClass::cast($type, $attribute['value']);
202
}
203
204
- if (is_numeric($i)) {
+ if (is_numeric($i) && $key) {
205
$ret[$key] = $this->useModelResponse ? $attribute : $attribute['value'];
206
} else {
207
$ret[$i] = $this->useModelResponse ? $attribute : $attribute['value'];
0 commit comments