From 6152004356bb21645f64c8b8464d1676e3b3c384 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 5 Apr 2022 15:35:37 -0500 Subject: [PATCH] Add check for nothingness to link_or_text! Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> --- src/Kelpie.jl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Kelpie.jl b/src/Kelpie.jl index 2e46c82..b7cd44f 100644 --- a/src/Kelpie.jl +++ b/src/Kelpie.jl @@ -83,10 +83,12 @@ julia> prettyprint(link_or_text!(ElementNode("div"), "The end", ElementNode("hr" """ function link_or_text!(node, content...) for con in content - if typeof(con) <: EzXML.Node - link!(node, con) - else - link!(node, EzXML.TextNode(string(con))) + if !isnothing(con) + if typeof(con) <: EzXML.Node + link!(node, con) + else + link!(node, EzXML.TextNode(string(con))) + end #if end #if end #for