Skip to content

Commit

Permalink
fix: 修复自动分类路径可能为空的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Nov 5, 2023
1 parent bee47fa commit b31cbd0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/adaptors/base/baseExtendApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ class BaseExtendApi extends WebApi implements IBlogApi, IWebApi {
const docPathArray = save_dir.split("/")
if (docPathArray.length > 1) {
for (let i = 1; i < docPathArray.length; i++) {
const docCate = HtmlUtil.removeTitleNumber(docPathArray[i])
const docPath = docPathArray[i]
if(StrUtil.isEmptyString(docPath)){
continue
}
const docCate = HtmlUtil.removeTitleNumber(docPath)
pathCates.push(docCate)
}
}
Expand Down

0 comments on commit b31cbd0

Please sign in to comment.