Skip to content

Commit f717e63

Browse files
committed
修改生成wiki前缀的bug
1 parent afa162f commit f717e63

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

api_content.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,8 @@ func (cli *Client) PageFindOrCreateBySpaceAndTitle(space, parentId, title, wikiD
176176
// 获取文件的路径
177177
pagePath := ""
178178
lastAncestorId := ""
179-
for i, ancestor := range content.Ancestors {
180-
if i != 0 {
181-
pagePath += "/" + ancestor.Title
182-
}
179+
for _, ancestor := range content.Ancestors {
180+
pagePath += "/" + ancestor.Title
183181
lastAncestorId = ancestor.Id
184182
}
185183

0 commit comments

Comments
 (0)