Commit d9169ab1 authored by Coraline Ada Ehmke's avatar Coraline Ada Ehmke

Defensive coding around node children

parent aef61c13
......@@ -16,7 +16,7 @@ class Snuffle::Element::MethodDefinition
def values
begin
return [] unless node.children.objects.any?
return [] unless node && node.children.objects.any?
node.children.objects[1].children.map{|child| child.name}.flatten
rescue
[]
......
......@@ -79,7 +79,7 @@
%em None
- else
%ul.indented
- summary.cohorts.group_by{|c| c.values.sort }.each do |values, cohorts|
- summary.cohorts.group_by{|c| c.values.map(&:to_s).sort }.each do |values, cohorts|
- if cohorts.count > 0
%li
= values.map{|c| ".#{c}" }.join(", ")
......@@ -87,7 +87,7 @@
(line
= ":#{cohorts.map(&:line_numbers).join(', :')}"
)
- summary.arg_clumps.group_by{|c| c.values.sort }.each do |args, clumps|
- summary.arg_clumps.group_by{|c| c.values.map(&:to_s).sort }.each do |args, clumps|
- if clumps.count > 0
%li
= args.map{|c| ".#{c}" }.join(", ")
......
module Snuffle
VERSION = "0.14.1"
VERSION = "0.14.2"
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment