diff --git a/src/components/editor/Editor.tsx b/src/components/editor/Editor.tsx index fcef0bf..ea7bab1 100644 --- a/src/components/editor/Editor.tsx +++ b/src/components/editor/Editor.tsx @@ -345,7 +345,7 @@ export function Editor() { return } - const readingTime = Math.max(1, Math.ceil(wordCount / 250)) + const readingTime = wordCount > 0 ? Math.max(1, Math.ceil(wordCount / 250)) : 0 return (
@@ -488,7 +488,7 @@ export function Editor() { className="flex items-center justify-between px-12 py-2 text-xs shrink-0" style={{ borderTop: '1px solid var(--border)', color: 'var(--text-faint)', background: 'var(--bg)' }} > - {wordCount} 字 · 约 {readingTime} 分钟阅读 + {wordCount} 字{wordCount > 0 ? ` · 约 ${readingTime} 分钟阅读` : ''} {saveStatus === 'saving' ? '保存中…' : saveStatus === 'unsaved' ? '未保存' : '已自动保存'}