about summary refs log tree commit diff
path: root/src/view/com/util/text
diff options
context:
space:
mode:
authorAryan Goharzad <arrygoo@gmail.com>2023-01-20 14:43:28 -0500
committerGitHub <noreply@github.com>2023-01-20 13:43:28 -0600
commit06e41167d05a26befb14b9742f4fc4ef3833d35d (patch)
tree53b1dea4922903ca91775980b6cfb1f0adea05e3 /src/view/com/util/text
parent2fce1637b4ae01667da8ceafaa07a6266ab88450 (diff)
downloadvoidsky-06e41167d05a26befb14b9742f4fc4ef3833d35d.tar.zst
Lints some errors and warnings (#76)
Diffstat (limited to 'src/view/com/util/text')
-rw-r--r--src/view/com/util/text/RichText.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/view/com/util/text/RichText.tsx b/src/view/com/util/text/RichText.tsx
index a7bc92a45..f04f4566d 100644
--- a/src/view/com/util/text/RichText.tsx
+++ b/src/view/com/util/text/RichText.tsx
@@ -46,8 +46,11 @@ export function RichText({
       </Text>
     )
   }
-  if (!style) style = []
-  else if (!Array.isArray(style)) style = [style]
+  if (!style) {
+    style = []
+  } else if (!Array.isArray(style)) {
+    style = [style]
+  }
   entities.sort(sortByIndex)
   const segments = Array.from(toSegments(text, entities))
   const els = []