Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
electronicbites committed Aug 31, 2024
1 parent 539497d commit 4d99f70
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/radiator/outline/validations.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4d99f70

Please sign in to comment.