From 4149b681bd3fc134d1dfeb8660f99d3c45a63377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Thu, 28 Sep 2023 15:51:51 +0200 Subject: [PATCH] :wrench: Deactivate optimization that is causing errors --- common/src/app/common/data/macros.cljc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/common/src/app/common/data/macros.cljc b/common/src/app/common/data/macros.cljc index 6eabeacc9..697dcc20e 100644 --- a/common/src/app/common/data/macros.cljc +++ b/common/src/app/common/data/macros.cljc @@ -120,10 +120,12 @@ "A macro based, optimized variant of `get` that access the property directly on CLJS, on CLJ works as get." [obj prop] - (if (:ns &env) - (list (symbol ".") (with-meta obj {:tag 'js}) (symbol (str "-" (c/name prop)))) - (list `c/get obj prop))) - + ;; This throws an exception if obj is nul, that does not occur with CLJ get. + ;; This is causing many internal errors in places that obj null does not harm and should not throw. + ;; (if (:ns &env) + ;; (list (symbol ".") (with-meta obj {:tag 'js}) (symbol (str "-" (c/name prop)))) + (list `c/get obj prop)) + ;;) (def ^:dynamic *assert-context* nil)