@@ -508,27 +508,10 @@ async function _expandObject({
508
508
}
509
509
}
510
510
511
- const expandedValues = _asArray ( value ) . map ( v =>
512
- _isString ( v ) ? _expandIri ( activeCtx , v , { base : true } , options ) : v ) ;
513
-
514
- for ( const i in expandedValues ) {
515
- if ( _isString ( expandedValues [ i ] ) && ! _isAbsoluteIri ( expandedValues [ i ] ) ) {
516
- const expansionMapResult = await expansionMap ( {
517
- relativeIri : { type : key , value : expandedValues [ i ] } ,
518
- activeCtx,
519
- activeProperty,
520
- options,
521
- insideList
522
- } ) ;
523
- if ( expansionMapResult !== undefined ) {
524
- expandedValues [ i ] = expansionMapResult ;
525
- }
526
- }
527
- }
528
-
529
511
_addValue (
530
512
expandedParent , '@id' ,
531
- expandedValues ,
513
+ _asArray ( value ) . map ( v =>
514
+ _isString ( v ) ? _expandIri ( activeCtx , v , { base : true } , options ) : v ) ,
532
515
{ propertyIsArray : options . isFrame } ) ;
533
516
continue ;
534
517
}
@@ -546,29 +529,12 @@ async function _expandObject({
546
529
}
547
530
_validateTypeValue ( value , options . isFrame ) ;
548
531
549
- const expandedValues = _asArray ( value ) . map ( v =>
550
- _isString ( v ) ?
551
- _expandIri ( typeScopedContext , v ,
552
- { base : true , vocab : true } , options ) : v ) ;
553
-
554
- for ( const i in expandedValues ) {
555
- if ( _isString ( expandedValues [ i ] ) && ! _isAbsoluteIri ( expandedValues [ i ] ) ) {
556
- const expansionMapResult = await expansionMap ( {
557
- relativeIri : { type : key , value : expandedValues [ i ] } ,
558
- activeCtx,
559
- activeProperty,
560
- options,
561
- insideList
562
- } ) ;
563
- if ( expansionMapResult !== undefined ) {
564
- expandedValues [ i ] = expansionMapResult ;
565
- }
566
- }
567
- }
568
-
569
532
_addValue (
570
533
expandedParent , '@type' ,
571
- expandedValues ,
534
+ _asArray ( value ) . map ( v =>
535
+ _isString ( v ) ?
536
+ _expandIri ( typeScopedContext , v ,
537
+ { base : true , vocab : true } , options ) : v ) ,
572
538
{ propertyIsArray : options . isFrame } ) ;
573
539
continue ;
574
540
}
0 commit comments