Skip to content

Commit

Permalink
Nested object mapping to settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Spamercz committed Jun 28, 2021
1 parent 0fb9cc3 commit c22b529
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Mapping/Settings/Mapping.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ public function toArray(): array
$fields[$field->key()] = $field->toArray();
continue;
}
if ($field instanceof \Spameri\ElasticQuery\Mapping\Settings\Mapping\NestedObject) {
$fields[$field->key()] = $field->toArray();
continue;
}

$fields[$field->key()] = $field->toArray()[$field->key()];
}
Expand Down

0 comments on commit c22b529

Please sign in to comment.