@@ -9,7 +9,7 @@ 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 ) ? this . schema : { } ) ,
1313 $schemaPath : this . schemaPath . slice ( ) ,
1414 $parsedSchema : true ,
1515 schemaType : SCHEMA_TYPES . JSONLD_CONTEXT ,
@@ -24,7 +24,7 @@ export class JsonLdContextSchemaParser extends MonoSchemaParser {
2424 // Handle array context
2525 if ( Array . isArray ( contextSchema ) ) {
2626 return {
27- ...( typeof this . schema === "object" ? this . schema : { } ) ,
27+ ...( typeof this . schema === "object" && ! Array . isArray ( this . schema ) ? this . schema : { } ) ,
2828 $schemaPath : this . schemaPath . slice ( ) ,
2929 $parsedSchema : true ,
3030 schemaType : SCHEMA_TYPES . JSONLD_CONTEXT ,
@@ -49,7 +49,7 @@ export class JsonLdContextSchemaParser extends MonoSchemaParser {
4949 const contextProperties = this . getContextSchemaContent ( contextSchema ) ;
5050
5151 return {
52- ...( typeof this . schema === "object" ? this . schema : { } ) ,
52+ ...( typeof this . schema === "object" && ! Array . isArray ( this . schema ) ? this . schema : { } ) ,
5353 $schemaPath : this . schemaPath . slice ( ) ,
5454 $parsedSchema : true ,
5555 schemaType : SCHEMA_TYPES . JSONLD_CONTEXT ,
0 commit comments