From be506b465dafe636edeb651f33e90b9cdd21ec07 Mon Sep 17 00:00:00 2001 From: Steffen Deusch Date: Fri, 1 Mar 2024 23:08:44 +0100 Subject: [PATCH] Fix typespec of get_by_id/2 (#549) --- lib/floki.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/floki.ex b/lib/floki.ex index ff8fef9e..fc59bf99 100644 --- a/lib/floki.ex +++ b/lib/floki.ex @@ -307,7 +307,7 @@ defmodule Floki do nil """ - @spec get_by_id(html_tree() | html_node(), String.t()) :: html_tree + @spec get_by_id(html_tree() | html_node(), String.t()) :: html_node() | nil def get_by_id(html_tree_as_tuple, id) when is_list(html_tree_as_tuple) or is_html_node(html_tree_as_tuple) do html_tree_as_tuple