From 968200b84f175a4b086931b313744a31e8bd67b7 Mon Sep 17 00:00:00 2001 From: Brandon Davis Date: Fri, 4 Dec 2020 14:08:07 -0500 Subject: [PATCH] Small fix --- client/viame-web-common/components/AttributeInput.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/viame-web-common/components/AttributeInput.vue b/client/viame-web-common/components/AttributeInput.vue index 16f53012b..91b78ba7d 100644 --- a/client/viame-web-common/components/AttributeInput.vue +++ b/client/viame-web-common/components/AttributeInput.vue @@ -73,8 +73,9 @@ export default defineComponent({ function change(event: InputEvent): void { const target = event.target as HTMLInputElement; const { name } = props; - if (target && target.value) { - emit('change', { name, value: target.value.trim() }); + const value = target.value.trim(); + if (value) { + emit('change', { name, value }); } else { emit('change', { name, value: undefined }); }