Fixed #52
This commit is contained in:
@@ -3,7 +3,7 @@ let lastSearch = ""
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { TFile } from "obsidian"
|
import { Notice, TFile } from "obsidian"
|
||||||
import { onMount, tick } from "svelte"
|
import { onMount, tick } from "svelte"
|
||||||
import InputSearch from "./InputSearch.svelte"
|
import InputSearch from "./InputSearch.svelte"
|
||||||
import ModalContainer from "./ModalContainer.svelte"
|
import ModalContainer from "./ModalContainer.svelte"
|
||||||
@@ -67,7 +67,13 @@ function onInputCtrlEnter(): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function onInputShiftEnter(): Promise<void> {
|
async function onInputShiftEnter(): Promise<void> {
|
||||||
await createNote(searchQuery)
|
try {
|
||||||
|
await createNote(searchQuery)
|
||||||
|
}
|
||||||
|
catch(e) {
|
||||||
|
new Notice((e as Error).message)
|
||||||
|
return
|
||||||
|
}
|
||||||
modal.close()
|
modal.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ export async function createNote(name: string): Promise<void> {
|
|||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
|
throw e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user