Guard against a LocalJumpError in Project#project_tree

This commit is contained in:
Eric Davis 2011-11-14 19:23:49 -08:00
parent af9572d985
commit 1e41ec912b
1 changed files with 1 additions and 1 deletions

View File

@ -616,7 +616,7 @@ class Project < ActiveRecord::Base
while (ancestors.any? && !project.is_descendant_of?(ancestors.last))
ancestors.pop
end
yield project, ancestors.size
yield project, ancestors.size if block_given?
ancestors << project
end
end