Skip to content

Commit bc352c5

Browse files
author
Munir Khakhi
committed
Fixed json mapping condition for empty body
1 parent 867b11a commit bc352c5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ApiBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ protected function processQueryMappings($arguments, $api, $uri): string
479479
protected function processJsonMappings($arguments, $api): array
480480
{
481481
$json = json_encode(array_get($api, 'body', []));
482-
if (empty($json)) {
482+
if ($json === '[]') {
483483
return [];
484484
}
485485
foreach (array_get($api, 'mappings.body', []) as $key => $value) {

0 commit comments

Comments
 (0)