@@ -9,7 +9,9 @@ export class JsonLdContextSchemaParser extends MonoSchemaParser {
99 // Handle string context (URI reference)
1010 if ( typeof contextSchema === "string" ) {
1111 return {
12- ...( typeof this . schema === "object" ? this . schema : { } ) ,
12+ ...( typeof this . schema === "object" && ! Array . isArray ( this . schema )
13+ ? this . schema
14+ : { } ) ,
1315 $schemaPath : this . schemaPath . slice ( ) ,
1416 $parsedSchema : true ,
1517 schemaType : SCHEMA_TYPES . JSONLD_CONTEXT ,
@@ -24,7 +26,9 @@ export class JsonLdContextSchemaParser extends MonoSchemaParser {
2426 // Handle array context
2527 if ( Array . isArray ( contextSchema ) ) {
2628 return {
27- ...( typeof this . schema === "object" ? this . schema : { } ) ,
29+ ...( typeof this . schema === "object" && ! Array . isArray ( this . schema )
30+ ? this . schema
31+ : { } ) ,
2832 $schemaPath : this . schemaPath . slice ( ) ,
2933 $parsedSchema : true ,
3034 schemaType : SCHEMA_TYPES . JSONLD_CONTEXT ,
@@ -49,7 +53,9 @@ export class JsonLdContextSchemaParser extends MonoSchemaParser {
4953 const contextProperties = this . getContextSchemaContent ( contextSchema ) ;
5054
5155 return {
52- ...( typeof this . schema === "object" ? this . schema : { } ) ,
56+ ...( typeof this . schema === "object" && ! Array . isArray ( this . schema )
57+ ? this . schema
58+ : { } ) ,
5359 $schemaPath : this . schemaPath . slice ( ) ,
5460 $parsedSchema : true ,
5561 schemaType : SCHEMA_TYPES . JSONLD_CONTEXT ,
0 commit comments