Skip to content

Commit

Permalink
implement *display-name-hook*
Browse files Browse the repository at this point in the history
  • Loading branch information
darwin committed Feb 3, 2020
1 parent 2020508 commit e43f4b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/helix/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
body))
(cond->
(true? ^boolean goog/DEBUG)
(doto (goog.object/set "displayName" ~fully-qualified-name)))
(doto (goog.object/set "displayName" (*display-name-hook* ~fully-qualified-name))))
~@(-> opts :wrap)))

(def ~display-name
Expand Down
1 change: 1 addition & 0 deletions src/helix/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
["react" :as react])
(:require-macros [helix.core]))

(def ^:dynamic *display-name-hook* identity)

(when (exists? js/Symbol)
(extend-protocol IPrintWithWriter
Expand Down

0 comments on commit e43f4b7

Please sign in to comment.