mirror of
https://github.com/status-im/re-frame-10x.git
synced 2025-02-18 00:46:22 +00:00
Check if JSONML object has body before expanding
This commit is contained in:
parent
7a8662edea
commit
fa4fca778c
@ -57,6 +57,9 @@
|
|||||||
(defn cljs-devtools-body [& args]
|
(defn cljs-devtools-body [& args]
|
||||||
(apply make-devtools-api-call devtools.formatters.core/body-api-call args))
|
(apply make-devtools-api-call devtools.formatters.core/body-api-call args))
|
||||||
|
|
||||||
|
(defn cljs-devtools-has-body [& args]
|
||||||
|
(apply make-devtools-api-call devtools.formatters.core/has-body-api-call args))
|
||||||
|
|
||||||
(defn get-object [jsonml]
|
(defn get-object [jsonml]
|
||||||
(.-object (get jsonml 1)))
|
(.-object (get jsonml 1)))
|
||||||
|
|
||||||
@ -72,7 +75,7 @@
|
|||||||
[:span {:class "toggle"
|
[:span {:class "toggle"
|
||||||
:on-click #(swap! expanded? not)}
|
:on-click #(swap! expanded? not)}
|
||||||
[:button.expansion-button (if @expanded? "▼" "▶")]]
|
[:button.expansion-button (if @expanded? "▼" "▶")]]
|
||||||
(jsonml->hiccup (if @expanded?
|
(jsonml->hiccup (if (and @expanded? (cljs-devtools-has-body (get-object jsonml) (get-config jsonml)))
|
||||||
(cljs-devtools-body
|
(cljs-devtools-body
|
||||||
(get-object jsonml)
|
(get-object jsonml)
|
||||||
(get-config jsonml))
|
(get-config jsonml))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user