chore: replace re-find with safe-re-find

This commit is contained in:
Tienson Qin
2021-05-23 12:58:41 +08:00
parent d256982c9c
commit 6c70914150
17 changed files with 61 additions and 51 deletions

View File

@@ -324,7 +324,7 @@
(remove string/blank?)
(map (fn [x]
(if (or (contains? #{"+" "-"} (first x))
(and (re-find #"\d" (first x))
(and (util/safe-re-find #"\d" (first x))
(some #(string/ends-with? x %) ["y" "m" "d" "h" "min"])))
(keyword (name x))
x)))