diff --git a/frontend/src/views/HomeView.vue b/frontend/src/views/HomeView.vue index f9ed24c..9d652ff 100644 --- a/frontend/src/views/HomeView.vue +++ b/frontend/src/views/HomeView.vue @@ -62,8 +62,10 @@ async function updateFromRoutePath() { selectedNote.value = await noteRepository.getByPath(path.join("/")) } catch (e) { console.log(`${e}`) - errorMessage.value = e.message - errorDialog.value?.showModal() + if (e instanceof Error) { + errorMessage.value = e.message + errorDialog.value?.showModal() + } return } console.log("updating note with note", selectedNote.value) @@ -85,12 +87,18 @@ async function updateFromRoutePath() { directoryContent.value = await directoryContentRepository.getByPath(currentDirectory.value) } catch (e) { console.log(`${e}`) - errorMessage.value = e.message - errorDialog.value?.showModal() + if (e instanceof Error) { + errorMessage.value = e.message + errorDialog.value?.showModal() + } return } } +function closeErrorDialog() { + errorMessage.value = "" + errorDialog.value?.close() +} onMounted(async () => { updateFromRoutePath() @@ -148,7 +156,7 @@ function showSidebar() {

Error

-