chore: remove unnecessary comments and suppress error logging
This commit is contained in:
@@ -244,13 +244,12 @@ const scheduleMarkdownSync = () => {
|
||||
hasGhostSuggestion = Boolean(state?.suggestion && state.from < state.to)
|
||||
})
|
||||
|
||||
// Ghost text is transient UI state and should not leak to emitted markdown.
|
||||
if (hasGhostSuggestion) return
|
||||
|
||||
const markdown = await crepe.getMarkdown()
|
||||
emit('update:markdown', markdown)
|
||||
} catch (e) {
|
||||
// sync error, ignore
|
||||
} catch {
|
||||
// Ignore sync errors
|
||||
}
|
||||
}, 120)
|
||||
}
|
||||
@@ -357,8 +356,8 @@ const performOCR = async (file, cacheKey, imageHash = '') => {
|
||||
setOcrByHash(imageHash, data.text)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('[OCR] Error:', e)
|
||||
} catch {
|
||||
// OCR error, ignore
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(file)
|
||||
@@ -446,7 +445,6 @@ onMounted(async () => {
|
||||
}))
|
||||
})
|
||||
|
||||
// Watch for debounce changes
|
||||
watch(() => settings.debounceMs, (newVal) => {
|
||||
if (!crepe) return
|
||||
crepe.editor.action((ctx) => {
|
||||
@@ -538,8 +536,8 @@ const handleFileUpload = async (event) => {
|
||||
if (crepe && crepe.editor) {
|
||||
crepe.editor.action(replaceAll(text))
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('[Error] Upload failed:', e)
|
||||
} catch {
|
||||
// File upload error, ignore
|
||||
}
|
||||
|
||||
input.value = ''
|
||||
|
||||
@@ -113,7 +113,6 @@ const appearanceMode = computed({
|
||||
}
|
||||
})
|
||||
|
||||
// Background Image Handling
|
||||
const handleImageUpload = (event) => {
|
||||
const file = event.target.files[0]
|
||||
if (file) {
|
||||
@@ -126,7 +125,6 @@ const handleImageUpload = (event) => {
|
||||
}
|
||||
}
|
||||
|
||||
// Helper to translate
|
||||
const t = (key) => store.t[key]
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user