diff --git a/lib/redmine/menu_manager.rb b/lib/redmine/menu_manager.rb index 996b1c5..0310fad 100644 --- a/lib/redmine/menu_manager.rb +++ b/lib/redmine/menu_manager.rb @@ -74,6 +74,7 @@ module TreeNodePatch # parent is set to be the receiver. The child is added as the last child in # the current list of children for the receiver node. def add(child) + @childrenHash ||= {} raise "Child already added" if @childrenHash.has_key?(child.name) @childrenHash[child.name] = child