Skip to content

Commit

Permalink
Hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
mrzapp committed May 27, 2021
1 parent c368b60 commit 1a823ee
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Server/Entity/Resource/SchemaBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,18 +352,18 @@ class SchemaBase extends require('Common/Entity/Resource/SchemaBase') {

switch(definition['@type']) {
case 'ItemList':
let allowedSchemas = [];
let allowedFieldSchemas = [];

for(let schemaId of definition['@options'] || []) {
allowedSchemas.push(this.translateTypeFromUISchema(schemaId));
allowedFieldSchemas.push(this.translateTypeFromUISchema(schemaId));
}

return {
label: i18n['@name'] || key,
isLocalized: isLocalized,
schemaId: 'array',
config: {
allowedSchemas: allowedSchemas,
allowedSchemas: allowedFieldSchemas,
minItems: definition['@min'] || 0,
maxItems: definition['@max'] || 0
}
Expand Down Expand Up @@ -404,18 +404,18 @@ class SchemaBase extends require('Common/Entity/Resource/SchemaBase') {
};

case 'CreativeWork':
let allowedSchemas = [];
let allowedContentSchemas = [];

for(let schemaId of definition['@options'] || []) {
allowedSchemas.push(this.translateTypeFromUISchema(schemaId));
allowedContentSchemas.push(this.translateTypeFromUISchema(schemaId));
}

return {
label: i18n['@name'] || key,
isLocalized: isLocalized,
schemaId: 'contentReference',
config: {
allowedSchemas: allowedSchemas
allowedSchemas: allowedContentSchemas
}
};

Expand Down

0 comments on commit 1a823ee

Please sign in to comment.