From 48df741f8dd4750aa08983a09a71164fa379b8ab Mon Sep 17 00:00:00 2001 From: yenda Date: Mon, 3 Jun 2019 03:48:17 +0200 Subject: [PATCH] [perf] small perf improvement for nested-text Signed-off-by: Andrey Shovkoplyas --- components/src/status_im/ui/components/react.cljs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/components/src/status_im/ui/components/react.cljs b/components/src/status_im/ui/components/react.cljs index ab30eb2d83..4ba6fab2c8 100644 --- a/components/src/status_im/ui/components/react.cljs +++ b/components/src/status_im/ui/components/react.cljs @@ -128,9 +128,12 @@ (vector? text-element) (let [[options nested-text-elements] text-element] - [nested-text (prepare-text-props - (utils.core/deep-merge options-with-style - options)) + [(if (string? nested-text-elements) + text-class + nested-text) + (prepare-text-props + (utils.core/deep-merge options-with-style + options)) nested-text-elements])))) [text-class options-with-style] nested-text-elements))))