From c6d3032be8a7216b14a78f98d4229b467b08bf28 Mon Sep 17 00:00:00 2001 From: Mari Date: Sun, 10 Oct 2021 08:49:58 -0400 Subject: [PATCH] Minor fixes to schema stuff --- src/schemata/SchemaData.ts | 2 +- src/schemata/YAMLPrompt.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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())