From 73a1ac521a303cf4c65fadab21b7c9681f98064e Mon Sep 17 00:00:00 2001 From: Nancy Butler <42977925+mantis-toboggan-md@users.noreply.github.com> Date: Wed, 3 Jan 2024 11:45:35 -0800 Subject: [PATCH] typescript fixes 2 electric bugaloo --- pkg/capi/components/CCVariables/index.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/capi/components/CCVariables/index.vue b/pkg/capi/components/CCVariables/index.vue index fa2a80f..b999020 100644 --- a/pkg/capi/components/CCVariables/index.vue +++ b/pkg/capi/components/CCVariables/index.vue @@ -136,9 +136,8 @@ export default defineComponent({ /** * When the cluster class changes, update the variables array: * remove any variables not defined in the new cluster class - * if a variable is defined in both cluster classes, clear out the old default + * if a variable is defined in both cluster classes, clear out the old value * set default values from the new cluster class definitions - * if a variable is defined in both old and new cluster classes, and the user has set its value to something other than the old default, preserve that */ updateVariableDefaults(neu: ClusterClassVariable[], old: ClusterClassVariable[]) { const out = [...this.value].reduce((acc: CapiClusterVariable[], existingVar: CapiClusterVariable) => { @@ -189,8 +188,9 @@ export default defineComponent({ }, newComponentType(variableDef: ClusterClassVariable, i: number) { - const inputEl = this.$refs[`${ variableDef.name }-input`]?.[0]?.$el; - const nextInputEl = this.$refs[`${ this.variableDefinitions[i + 1]?.name }-input`]?.[0]?.$el; + const refs = this.$refs as {[key:string]: any[]}; + const inputEl = refs[`${ variableDef.name }-input`]?.[0]?.$el; + const nextInputEl = refs[`${ this.variableDefinitions[i + 1]?.name }-input`]?.[0]?.$el; if (!nextInputEl) { return false;