From c9e85cb52b562cf9dcfac3ed54d8289e2b499992 Mon Sep 17 00:00:00 2001 From: Dominik Pschenitschni Date: Wed, 20 Jul 2022 21:15:35 +0200 Subject: [PATCH] feat: improve types --- src/components/tasks/add-task.vue | 2 +- src/components/tasks/partials/editLabels.vue | 2 +- src/components/tasks/partials/listSearch.vue | 4 +-- src/components/tasks/partials/reminders.vue | 4 +-- src/helpers/attachments.ts | 2 +- src/helpers/utils.ts | 4 +-- src/models/constants/priorities.ts | 4 ++- src/models/task.ts | 3 ++- src/models/taskRelation.ts | 26 +++++++++++--------- src/modules/parseTaskText.ts | 2 +- src/services/abstractService.ts | 24 +++++++++--------- src/services/attachment.ts | 14 +++++------ src/services/backgroundUpload.ts | 4 +-- src/services/task.ts | 2 +- 14 files changed, 52 insertions(+), 45 deletions(-) diff --git a/src/components/tasks/add-task.vue b/src/components/tasks/add-task.vue index 2a4b2e3e..ef45ca88 100644 --- a/src/components/tasks/add-task.vue +++ b/src/components/tasks/add-task.vue @@ -200,7 +200,7 @@ function handleEnter(e: KeyboardEvent) { } function focusTaskInput() { - newTaskInput.value.focus() + newTaskInput.value?.focus() } defineExpose({ diff --git a/src/components/tasks/partials/editLabels.vue b/src/components/tasks/partials/editLabels.vue index bc218519..0e285822 100644 --- a/src/components/tasks/partials/editLabels.vue +++ b/src/components/tasks/partials/editLabels.vue @@ -117,7 +117,7 @@ async function removeLabel(label: LabelModel) { for (const l in labels.value) { if (labels.value[l].id === label.id) { - labels.value.splice(l, 1) + labels.value.splice(l, 1) // FIXME: l should be index } } emit('update:modelValue', labels.value) diff --git a/src/components/tasks/partials/listSearch.vue b/src/components/tasks/partials/listSearch.vue index 58c15643..df53679f 100644 --- a/src/components/tasks/partials/listSearch.vue +++ b/src/components/tasks/partials/listSearch.vue @@ -1,5 +1,5 @@ - +