Don't call id on nil

This commit is contained in:
Joshua Peek
2011-09-27 13:48:16 -05:00
parent 39b1177ba0
commit 985fade9f6
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -381,6 +381,7 @@ module Gollum
#
# Returns the Page or nil if none exists.
def find_sub_page(name)
return nil unless self.version
return nil if self.filename =~ /^_/
name = "_#{name.to_s.capitalize}"
return nil if page_match(name, self.filename)