From 92091b52a27a4e8f2d12b423cdc5877a62631218 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Mon, 26 Oct 2020 09:56:40 -0700 Subject: [PATCH] More deprecation fixes --- ui/drawer-component.ts | 8 ++++---- ui/ui-config-component.ts | 7 +------ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/ui/drawer-component.ts b/ui/drawer-component.ts index 4e75f9d..1d1d76f 100644 --- a/ui/drawer-component.ts +++ b/ui/drawer-component.ts @@ -49,10 +49,10 @@ function mval(val): Children { } function renderStagingSpv(task: StageTask, queueFunc, cancelFunc): Children { - function keydown(e): void { - if (e.keyCode === 13) queueFunc(); - else if (e.keyCode === 27) cancelFunc(); - else e.redraw = false; + function keydown(e: KeyboardEvent): void { + if (e.key === "Enter") queueFunc(); + else if (e.key === "Escape") cancelFunc(); + else e["redraw"] = false; } let input; diff --git a/ui/ui-config-component.ts b/ui/ui-config-component.ts index caba6b0..0f55d39 100644 --- a/ui/ui-config-component.ts +++ b/ui/ui-config-component.ts @@ -102,12 +102,7 @@ const component: ClosureComponent = (): Component => { const yamlString = config && Object.values(config).length - ? yaml.stringify(config, { - schema: "failsafe", - tags: (args) => { - return args; - }, - }) + ? yaml.stringify(config, { schema: "failsafe" }) : ""; const attrs = {