Preserve existing @reverse map when merging properties.
This commit is contained in:
parent
ea1d54b31d
commit
2245638c1e
1 changed files with 5 additions and 1 deletions
|
@ -2435,7 +2435,11 @@ class JsonLdProcessor {
|
|||
if(property_exists($active_ctx->mappings, $key) &&
|
||||
$active_ctx->mappings->{$key} &&
|
||||
$active_ctx->mappings->{$key}->reverse) {
|
||||
$reverse_map = $rval->{'@reverse'} = new stdClass();
|
||||
if(property_exists($rval, '@reverse')) {
|
||||
$reverse_map = $rval->{'@reverse'};
|
||||
} else {
|
||||
$reverse_map = $rval->{'@reverse'} = new stdClass();
|
||||
}
|
||||
$expanded_value = self::arrayify($expanded_value);
|
||||
foreach($expanded_value as $item) {
|
||||
if(self::_isValue($item) || self::_isList($item)) {
|
||||
|
|
Loading…
Reference in a new issue