@@ -9,7 +9,7 @@ export class JsonLdContextSchemaParser extends MonoSchemaParser {
9
9
// Handle string context (URI reference)
10
10
if ( typeof contextSchema === "string" ) {
11
11
return {
12
- ...( typeof this . schema === "object" ? this . schema : { } ) ,
12
+ ...( typeof this . schema === "object" && ! Array . isArray ( this . schema ) ? this . schema : { } ) ,
13
13
$schemaPath : this . schemaPath . slice ( ) ,
14
14
$parsedSchema : true ,
15
15
schemaType : SCHEMA_TYPES . JSONLD_CONTEXT ,
@@ -24,7 +24,7 @@ export class JsonLdContextSchemaParser extends MonoSchemaParser {
24
24
// Handle array context
25
25
if ( Array . isArray ( contextSchema ) ) {
26
26
return {
27
- ...( typeof this . schema === "object" ? this . schema : { } ) ,
27
+ ...( typeof this . schema === "object" && ! Array . isArray ( this . schema ) ? this . schema : { } ) ,
28
28
$schemaPath : this . schemaPath . slice ( ) ,
29
29
$parsedSchema : true ,
30
30
schemaType : SCHEMA_TYPES . JSONLD_CONTEXT ,
@@ -49,7 +49,7 @@ export class JsonLdContextSchemaParser extends MonoSchemaParser {
49
49
const contextProperties = this . getContextSchemaContent ( contextSchema ) ;
50
50
51
51
return {
52
- ...( typeof this . schema === "object" ? this . schema : { } ) ,
52
+ ...( typeof this . schema === "object" && ! Array . isArray ( this . schema ) ? this . schema : { } ) ,
53
53
$schemaPath : this . schemaPath . slice ( ) ,
54
54
$parsedSchema : true ,
55
55
schemaType : SCHEMA_TYPES . JSONLD_CONTEXT ,
0 commit comments