Skip to content

Commit 1dd2324

Browse files
committed
fix: exception in creating new post flow
1 parent 77cdf9d commit 1dd2324

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/commands/posts-list/save-post.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export const saveLocalDraftToCnblogs = async (localDraft: LocalDraftFile) => {
7676
post.postBody = content;
7777
post.title = localDraft.fileNameWithoutExt;
7878
post.isMarkdown = true;
79+
post.categoryIds ??= [];
7980
const userInputPostConfig = await inputPostSettings(post.title, post);
8081
if (!userInputPostConfig) {
8182
AlertService.warning('操作已取消');

0 commit comments

Comments
 (0)