Skip to content

Commit c646898

Browse files
committed
Export missing S3 method
1 parent d5652f3 commit c646898

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ S3method(xml_find_all,xml_nodeset)
8686
S3method(xml_find_chr,xml_missing)
8787
S3method(xml_find_chr,xml_node)
8888
S3method(xml_find_chr,xml_nodeset)
89+
S3method(xml_find_first,xml_missing)
8990
S3method(xml_find_first,xml_node)
9091
S3method(xml_find_first,xml_nodeset)
9192
S3method(xml_find_lgl,xml_missing)

R/xml_find.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ xml_find_first <- function(x, xpath, ns = xml_ns(x)) {
113113
UseMethod("xml_find_first")
114114
}
115115

116+
#' @export
116117
xml_find_first.xml_missing <- function(x, xpath, ns = xml_ns(x)) {
117118
xml_missing()
118119
}
@@ -121,7 +122,7 @@ xml_find_first.xml_missing <- function(x, xpath, ns = xml_ns(x)) {
121122
xml_find_first.xml_node <- function(x, xpath, ns = xml_ns(x)) {
122123
res <- .Call(xpath_search, x$node, x$doc, xpath, ns, 1)
123124
if (length(res) == 1) {
124-
res[[1]]
125+
res[[1]]
125126
} else {
126127
res
127128
}

0 commit comments

Comments
 (0)