Skip to content

Commit

Permalink
Merge pull request #187 from kovasap/master
Browse files Browse the repository at this point in the history
Fixes import issue when using newer JS module build.
  • Loading branch information
metasoarous authored Mar 9, 2022
2 parents e3bb75f + d5d490d commit 77e4039
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cljs/oz/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
[reagent.core :as r]
[reagent.dom :as rd]))

; See https://github.com/thheller/shadow-cljs/issues/988#issuecomment-1046175204
(def vegaEmbed* (if (fn? vegaEmbed) vegaEmbed vegaEmbed/default))


(enable-console-print!)
Expand Down Expand Up @@ -38,7 +40,7 @@
opts (merge {:renderer :canvas}
;; Have to think about how we want the defaults here to behave
opts)]
(-> (vegaEmbed elem doc (clj->js opts))
(-> (vegaEmbed* elem doc (clj->js opts))
(.then (fn [res]
(when view-callback
(view-callback (.-view res)))))
Expand Down

0 comments on commit 77e4039

Please sign in to comment.