Only set parentpage if a subpage was found
Fixes error if there's no header or footer
This commit is contained in:
+3
-2
@@ -435,8 +435,9 @@ module Gollum
|
||||
dirs.pop
|
||||
end
|
||||
|
||||
page = find_page_in_tree(map, name, '')
|
||||
page.parent_page = self
|
||||
if page = find_page_in_tree(map, name, '')
|
||||
page.parent_page = self
|
||||
end
|
||||
page
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user