[fix #6087] error on empty messages
add a guard so that `right-to-left-text?` function doesn't throw an error on empty content future empty messages aren't going to pass validation Signed-off-by: yenda <eric@status.im>
This commit is contained in:
parent
37c3f30d75
commit
23679ac5b4
|
@ -52,8 +52,9 @@
|
|||
(def rtl-characters-regex #"[^\u0591-\u06EF\u06FA-\u07FF\u200F\u202B\u202E\uFB1D-\uFDFD\uFE70-\uFEFC]*?[\u0591-\u06EF\u06FA-\u07FF\u200F\u202B\u202E\uFB1D-\uFDFD\uFE70-\uFEFC]")
|
||||
|
||||
(defn right-to-left-text? [content]
|
||||
(when-not (empty? content)
|
||||
(let [char (first content)]
|
||||
(re-matches rtl-characters-regex char)))
|
||||
(re-matches rtl-characters-regex char))))
|
||||
|
||||
(defview message-timestamp [t justify-timestamp? outgoing command? content]
|
||||
(when-not command?
|
||||
|
|
Loading…
Reference in New Issue