From 6f434aac8c8efa766e3653683c6b6e6a68cb9b03 Mon Sep 17 00:00:00 2001 From: Peter Savchenko Date: Wed, 18 Oct 2023 15:46:58 +0300 Subject: [PATCH] fix(note-settings): eslint error fixed --- src/application/services/useNoteSettings.ts | 8 +++----- src/presentation/pages/NoteSettings.vue | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/application/services/useNoteSettings.ts b/src/application/services/useNoteSettings.ts index a087f7ed..b4d1463e 100644 --- a/src/application/services/useNoteSettings.ts +++ b/src/application/services/useNoteSettings.ts @@ -17,7 +17,7 @@ interface UseNoteSettingsComposableState { * * @param id - note id */ - load: (id: NoteId | null) => Promise; + load: (id: NoteId) => Promise; } @@ -35,10 +35,8 @@ export default function (): UseNoteSettingsComposableState { * * @param id - Note id */ - const load = async (id: NoteId | null): Promise => { - if (id) { - noteSettings.value = await noteSettingsService.getNoteSettingsById(id); - } + const load = async (id: NoteId): Promise => { + noteSettings.value = await noteSettingsService.getNoteSettingsById(id); }; diff --git a/src/presentation/pages/NoteSettings.vue b/src/presentation/pages/NoteSettings.vue index 56a491e8..091a8d86 100644 --- a/src/presentation/pages/NoteSettings.vue +++ b/src/presentation/pages/NoteSettings.vue @@ -33,7 +33,7 @@ const props = defineProps<{ /** * Id of the current note */ - id: NoteId | null; + id: NoteId; }>(); const { load, noteSettings } = useNoteSettings();