Browse Source

add pre check for distinct-by-last-wins

rcmerci 2 years ago
parent
commit
b4a5589857
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/main/frontend/util.cljc

+ 2 - 3
src/main/frontend/util.cljc

@@ -481,9 +481,8 @@
 #?(:cljs
    (defn distinct-by-last-wins
      [f col]
-     (if (sequential? col)
-       (reverse (distinct-by f (reverse col)))
-       (distinct-by f col))))
+     {:pre [(sequential? col)]}
+     (reverse (distinct-by f (reverse col)))))
 
 (defn get-git-owner-and-repo
   [repo-url]