diff --git a/lib/radiator/outline/validations.ex b/lib/radiator/outline/validations.ex index b9e94711..3a0bed27 100644 --- a/lib/radiator/outline/validations.ex +++ b/lib/radiator/outline/validations.ex @@ -84,11 +84,16 @@ defmodule Radiator.Outline.Validations do end end - def validate_prev_node(%Node{uuid: id}, [%Node{prev_id: id} = node | rest_nodes], searched_nodes) do + def validate_prev_node( + %Node{uuid: id}, + [%Node{prev_id: id} = node | rest_nodes], + searched_nodes + ) do validate_prev_node(node, rest_nodes ++ searched_nodes, []) end def validate_prev_node(%Node{}, [], []), do: :ok + def validate_prev_node(%Node{} = prev_node, [node | rest_nodes], search_nodes) do validate_prev_node(prev_node, rest_nodes, [search_nodes | node]) end