0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-15 09:11:21 -05:00

Don't filter by whitespace

This commit is contained in:
Alejandro Gómez 2016-02-17 20:05:31 +01:00
parent 33cc0fe925
commit 1258d954d0

View file

@ -67,11 +67,11 @@
(defn contains-term?
[phrase term]
(str/contains? (str/lower phrase) (str/lower term)))
(str/contains? (str/lower phrase) (str/trim (str/lower term))))
(defn filter-projects-by
[term projs]
(if (= term "")
(if (str/blank? term)
projs
(filter #(contains-term? (:name %) term) projs)))