Skip to content

Commit 9968548

Browse files
committed
fix: post-file map check
1 parent 518dfb9 commit 9968548

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cmd/post-list/upload-post.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ export async function uploadPost(input?: Post | PostTreeItem | PostEditDto, conf
119119
post = input.post
120120
}
121121

122-
if (post === undefined) return
122+
if (post == null) return Alert.err('博文不存在')
123123

124124
const localFilePath = PostFileMapManager.getFilePath(post.id)
125-
if (localFilePath === undefined) return Alert.warn('本地无该博文的编辑记录')
125+
if (localFilePath == null) return Alert.warn('本地文件未关联到博客园博文,请确认文件路径或者重新关联')
126126

127127
await saveFilePendingChanges(localFilePath)
128128

0 commit comments

Comments
 (0)