fix: provide callback for focus-editor injection (#435)

pull/440/head
Joaquín Sánchez 2022-12-14 18:20:03 +01:00 zatwierdzone przez GitHub
rodzic 39ed6bffec
commit 1cd86996ab
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -7,7 +7,7 @@ const props = defineProps<{
command?: boolean
}>()
const focusEditor = inject<() => void>('focus-editor')
const focusEditor = inject<typeof noop>('focus-editor', noop)
const { details, command } = $(props)
@ -23,7 +23,7 @@ const reply = () => {
if (!checkLogin())
return
if (details) {
focusEditor?.()
focusEditor()
}
else {
const { key, draft } = getReplyDraft(status)