Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions src/component/renderable/schema/SchemaComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down Expand Up @@ -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<number, Section>();
Expand Down Expand Up @@ -267,7 +266,7 @@ export default class SchemaComponent extends SourceBaseComponent {
options,
cellManager,
partAnswer,
validationHandler
validationHandler
)
);
}
Expand All @@ -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();
Expand Down