@@ -621,7 +621,7 @@ async function _expandObject({
621621 value,
622622 expansionMap,
623623 asGraph,
624- indexKey : indexKey ,
624+ indexKey,
625625 propertyIndex
626626 } ) ;
627627 } else if ( container . includes ( '@id' ) && _isObject ( value ) ) {
@@ -932,9 +932,10 @@ async function _expandIndexMap(
932932 let expandedKey ;
933933 if ( propertyIndex ) {
934934 if ( key === '@none' ) {
935- expandedKey = '@none'
935+ expandedKey = '@none' ;
936936 } else {
937- expandedKey = _expandValue ( { activeCtx, activeProperty : indexKey , value : key , options} ) ;
937+ expandedKey = _expandValue (
938+ { activeCtx, activeProperty : indexKey , value : key , options} ) ;
938939 }
939940 } else {
940941 expandedKey = _expandIri ( activeCtx , key , { vocab : true } , options ) ;
@@ -960,13 +961,16 @@ async function _expandIndexMap(
960961 } else {
961962 item [ '@type' ] = [ key ] ;
962963 }
963- } else if ( _isValue ( item ) && ! [ '@language' , '@type' , '@index' ] . includes ( indexKey ) ) {
964+ } else if ( _isValue ( item ) &&
965+ ! [ '@language' , '@type' , '@index' ] . includes ( indexKey ) ) {
964966 throw new JsonLdError (
965- 'Invalid JSON-LD syntax; Attempt to add illegal key to value object: ${indexKey}.' ,
967+ 'Invalid JSON-LD syntax; Attempt to add illegal key to value ' +
968+ `object: "${ indexKey } ".` ,
966969 'jsonld.SyntaxError' ,
967970 { code : 'invalid value object' , value : item } ) ;
968971 } else if ( propertyIndex ) {
969- // index is a property to be expanded, and values interpreted for that property
972+ // index is a property to be expanded, and values interpreted for that
973+ // property
970974 if ( expandedKey !== '@none' ) {
971975 // expand key as a value
972976 _addValue ( item , propertyIndex , expandedKey , {
0 commit comments