mirror of https://github.com/status-im/reagent.git
Fix infer externs problem in with-let macro, fixes #420
This commit is contained in:
parent
d4038cb911
commit
ddd7f9a070
|
@ -54,7 +54,8 @@
|
|||
:output-to "target/cljsbuild/client/public/js/main.js"
|
||||
:npm-deps false
|
||||
:asset-path "js/out"
|
||||
:checked-arrays :warn}}
|
||||
:checked-arrays :warn
|
||||
:infer-externs true}}
|
||||
|
||||
{:id "client-npm"
|
||||
:source-paths ["demo"]
|
||||
|
@ -79,7 +80,8 @@
|
|||
:output-to "target/cljsbuild/test/main.js"
|
||||
:npm-deps false
|
||||
:aot-cache true
|
||||
:checked-arrays :warn}}
|
||||
:checked-arrays :warn
|
||||
:infer-externs true}}
|
||||
|
||||
{:id "test-npm"
|
||||
:source-paths ["test"]
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
asserting (if *assert* true false)]
|
||||
`(let [~v (reagent.ratom/with-let-values ~k)]
|
||||
(when ~asserting
|
||||
(when-some [c# reagent.ratom/*ratom-context*]
|
||||
(when-some [^clj c# reagent.ratom/*ratom-context*]
|
||||
(when (== (.-generation ~v) (.-ratomGeneration c#))
|
||||
(d/error "Warning: The same with-let is being used more "
|
||||
"than once in the same reactive context."))
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
:refer [flush track track! dispose!] :refer-macros [with-let]]
|
||||
[clojure.walk :as w]))
|
||||
|
||||
;; Test code generated from with-let macro
|
||||
;; https://github.com/reagent-project/reagent/issues/420
|
||||
(set! *warn-on-infer* true)
|
||||
|
||||
(defn fixture [f]
|
||||
(set! rv/debug true)
|
||||
(f)
|
||||
|
|
Loading…
Reference in New Issue