]> Untitled Git - lemmy.git/commitdiff
Fix user bio bug.
authorDessalines <tyhou13@gmx.com>
Sun, 2 Aug 2020 00:03:29 +0000 (20:03 -0400)
committerDessalines <tyhou13@gmx.com>
Sun, 2 Aug 2020 00:03:29 +0000 (20:03 -0400)
ui/src/components/user.tsx

index 9bda827465bbd4ee5c272752d51b98070615bae1..d4e689c81a0fe3dbf3ac4608aa90820225d28fdd 100644 (file)
@@ -384,12 +384,14 @@ export class User extends Component<any, UserState> {
                 )}
               </ul>
             </h5>
-            <div className="d-flex align-items-center mb-2">
-              <div
-                className="md-div"
-                dangerouslySetInnerHTML={mdToHtml(user.bio)}
-              />
-            </div>
+            {user.bio && (
+              <div className="d-flex align-items-center mb-2">
+                <div
+                  className="md-div"
+                  dangerouslySetInnerHTML={mdToHtml(user.bio)}
+                />
+              </div>
+            )}
             <div className="d-flex align-items-center mb-2">
               <svg class="icon">
                 <use xlinkHref="#icon-cake"></use>