diff --git a/lib/deja/node.rb b/lib/deja/node.rb index 1e7a4c7..a401e49 100644 --- a/lib/deja/node.rb +++ b/lib/deja/node.rb @@ -185,7 +185,7 @@ def link(node_alias) if node_aliases[:form] == :singular instance_variable_get("@#{node_aliases[:relationship]}_#{node_aliases[:direction]}").first else - instance_variable_get("@#{node_aliases[:relationship]}_#{node_aliases[:direction]}") + (instance_variable_get("@#{node_aliases[:relationship]}_#{node_aliases[:direction]}") || []) end end