From 93b40d1af5cc2e4310542ad809573b5cf5660207 Mon Sep 17 00:00:00 2001 From: Adam Mertzenich Date: Fri, 8 Mar 2024 23:02:40 -0600 Subject: [PATCH] fix: find-in-text retun value (string -> hzip-loc) --- src/cljc/hickory/select.cljc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cljc/hickory/select.cljc b/src/cljc/hickory/select.cljc index ad8cfc8..90ef38d 100644 --- a/src/cljc/hickory/select.cljc +++ b/src/cljc/hickory/select.cljc @@ -288,9 +288,11 @@ selected." [re] (fn [hzip-loc] - (some #(re-find re %) (->> (zip/node hzip-loc) - :content - (filter string?))))) + (when (some #(re-find re %) + (->> (zip/node hzip-loc) + :content + (filter string?))) + hzip-loc))) (defn n-moves-until "This selector returns a selector function that selects its argument if