From 2a6058d8d844d2068465a29267ccf71ef9146bfa Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Mon, 23 Sep 2024 14:34:27 -0700 Subject: [PATCH] Resolve typepscript errors in `StringList.vue` Signed-off-by: Phillip Rak --- .../Form/LabeledInput/LabeledInput.vue | 4 ++-- .../src/components/StringList/StringList.vue | 20 ++++++------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/pkg/rancher-components/src/components/Form/LabeledInput/LabeledInput.vue b/pkg/rancher-components/src/components/Form/LabeledInput/LabeledInput.vue index 4856b7ba56d..804db6ed15c 100644 --- a/pkg/rancher-components/src/components/Form/LabeledInput/LabeledInput.vue +++ b/pkg/rancher-components/src/components/Form/LabeledInput/LabeledInput.vue @@ -181,7 +181,7 @@ export default defineComponent({ return this.t('generic.invalidCron'); } try { - const hint = cronstrue.toString(this.value.toString()); + const hint = cronstrue.toString(this.value || ''); return hint; } catch (e) { @@ -332,7 +332,7 @@ export default defineComponent({ v-bind="$attrs" :maxlength="_maxlength" :disabled="isDisabled" - :value="value.toString()" + :value="value || ''" :placeholder="_placeholder" autocapitalize="off" :class="{ conceal: type === 'multiline-password' }" diff --git a/pkg/rancher-components/src/components/StringList/StringList.vue b/pkg/rancher-components/src/components/StringList/StringList.vue index c2e5219697d..ce6d9d000c6 100644 --- a/pkg/rancher-components/src/components/StringList/StringList.vue +++ b/pkg/rancher-components/src/components/StringList/StringList.vue @@ -1,8 +1,7 @@