From 5ece60e3e9cf680ba4f608a3c49679c557660b8d Mon Sep 17 00:00:00 2001 From: Nick Alexander Date: Thu, 4 Aug 2016 14:45:41 -0700 Subject: [PATCH] Review comment: be more strict in lookup-ref?. --- src/datomish/db.cljc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/datomish/db.cljc b/src/datomish/db.cljc index 05d52a36..63de0db2 100644 --- a/src/datomish/db.cljc +++ b/src/datomish/db.cljc @@ -644,8 +644,11 @@ (->> (update-txInstant db*))))) (defn- lookup-ref? [x] + "Return true if `x` is like [:attr value]." (and (sequential? x) - (= (count x) 2))) + (= (count x) 2) + (or (keyword? (first x)) + (integer? (first x))))) (defn