diff --git a/package-lock.json b/package-lock.json index 888791f..5504e2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "basiscore", - "version": "2.35.0", + "version": "2.36.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "basiscore", - "version": "2.35.0", + "version": "2.36.2", "license": "ISC", "dependencies": { "@types/pako": "^2.0.3", diff --git a/src/component/renderable/schema/SchemaComponent.ts b/src/component/renderable/schema/SchemaComponent.ts index f007721..9a7cc48 100644 --- a/src/component/renderable/schema/SchemaComponent.ts +++ b/src/component/renderable/schema/SchemaComponent.ts @@ -158,7 +158,6 @@ export default class SchemaComponent extends SourceBaseComponent { var schemaCallback: GetSchemaCallbackAsync = schemaCallbackStr ? eval(schemaCallbackStr) : null; - if (!schemaCallback) { schemaCallback = async (context, schemaUrl) => { // const url = Util.formatUrl(schemaUrlStr, null, { @@ -214,8 +213,8 @@ export default class SchemaComponent extends SourceBaseComponent { this._schema = await schemaCallback(this.context, options.paramUrl); const optionName = await this.getAttributeValueAsync("options"); let option = optionName ? eval(optionName) : null; - const validationHandler = new ValidationHandler(this._schema.lid, option); - const schemaDirection = this._schema.direction ?? direction; + const validationHandler = new ValidationHandler(this._schema?.lid, option); + const schemaDirection = this._schema?.direction ?? direction; options["direction"] = schemaDirection; container.setAttribute("data-bc-schema-direction", schemaDirection); const sections = new Map(); @@ -267,7 +266,7 @@ export default class SchemaComponent extends SourceBaseComponent { options, cellManager, partAnswer, -validationHandler + validationHandler ) ); } @@ -294,7 +293,7 @@ validationHandler let hasValidationError = false; let retVal: IUserActionResult = null; const errorResultSourceId = - await this.errorResultSourceIdToken?.getValueAsync(); + await this.errorResultSourceIdToken?.getValueAsync(); for (const question of this._questions) { try { var actions = await question.getUserActionAsync();