From 448e84a0e99a5a14583c82c278a7c5e0ae84b673 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Sat, 15 Sep 2018 08:59:30 +0300 Subject: [PATCH] adjust defview so that componen-map can be passed as the second arg --- src/status_im/utils/views.clj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/status_im/utils/views.clj b/src/status_im/utils/views.clj index b8a523c454..a0c18796a5 100644 --- a/src/status_im/utils/views.clj +++ b/src/status_im/utils/views.clj @@ -45,7 +45,10 @@ rest-body) [subs component-map body] (case (count rest-body') 1 [nil {} (first rest-body')] - 2 [(first rest-body') {} (second rest-body')] + 2 (let [first-element (first rest-body')] + (if (map? first-element) + [nil first-element (second rest-body')] + [(first rest-body') {} (second rest-body')])) 3 rest-body') [subs-bindings vars-bindings] (prepare-subs subs)] `(do