Skip to content

Commit ce5b537

Browse files
committed
handle a very specific case, this will prevent crashes
1 parent fbb92a7 commit ce5b537

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/resources.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ end
6969

7070
function html_elements(html::Vector{HTMLNode},string::String)
7171
elements = eachmatch.([Selector(string)],html)
72-
return reduce(vcat,elements) ## will solve the Vector of Vectors problem
72+
if isempty(elements)
73+
return elements
74+
else
75+
return reduce(vcat,elements) ## will solve the Vector of Vectors problem
76+
end
7377
end
7478

7579
function html_elements(html::HTMLDocument,strings::Vector{String})

0 commit comments

Comments
 (0)