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();