diff --git a/src/schemata/SchemaData.ts b/src/schemata/SchemaData.ts index 19f9462..f0077a5 100644 --- a/src/schemata/SchemaData.ts +++ b/src/schemata/SchemaData.ts @@ -8,7 +8,7 @@ interface BaseSchemaData { schema: unknown, key: ReferenceT, definition: { [key in ReferenceT]: unknown } - reference: { "ref": ReferenceT }, + reference: { "ref": ReferenceT } validate: ValidateFunction requiredReferences: AnyReferenceList } diff --git a/src/schemata/YAMLPrompt.ts b/src/schemata/YAMLPrompt.ts index ec93739..ef55f25 100644 --- a/src/schemata/YAMLPrompt.ts +++ b/src/schemata/YAMLPrompt.ts @@ -49,7 +49,7 @@ export async function promptForYaml({schema, currentValue, name}: YamlP if (schema.validate(result)) { return result } else { - await showError(schema.validate.errors?.map((e) => e.toString()).join("; ") || "Failed validation") + await showError(schema.validate.errors?.map((e) => e.toString()).join("; ") ?? "Failed validation") } } catch (e) { await showError(e.toString())