chore: remove unnecessary comments and suppress error logging

This commit is contained in:
2026-03-10 23:26:18 +08:00
parent 8d89c2a0f6
commit c0d4bf8b2b
7 changed files with 21 additions and 30 deletions

View File

@@ -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 = ''

View File

@@ -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>