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