From: Dessalines Date: Sat, 15 Feb 2020 21:09:53 +0000 (-0500) Subject: Fix minor issue with selector. Fix issue with truncate wrapping. X-Git-Url: http://these/git/%22https:/image.com/%7B%7D/static/%22%7Burl%7D/%7Burl%7D?a=commitdiff_plain;h=83d17b2643f1c9d56f2338cb244d857eddaf1fb4;p=lemmy.git Fix minor issue with selector. Fix issue with truncate wrapping. --- diff --git a/ui/src/components/post-form.tsx b/ui/src/components/post-form.tsx index 8abdf26d..d502330b 100644 --- a/ui/src/components/post-form.tsx +++ b/ui/src/components/post-form.tsx @@ -518,10 +518,12 @@ export class PostForm extends Component { // Set up select searching let selectId: any = document.getElementById('post-community'); - let selector = new Selectr(selectId, {}); - selector.on('selectr.select', option => { - this.state.postForm.community_id = Number(option.value); - }); + if (selectId) { + let selector = new Selectr(selectId, { nativeDropdown: false }); + selector.on('selectr.select', option => { + this.state.postForm.community_id = Number(option.value); + }); + } } else if (res.op == UserOperation.CreatePost) { let data = res.data as PostResponse; if (data.post.creator_id == UserService.Instance.user.id) { diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx index 1b8042f8..41cd6675 100644 --- a/ui/src/components/post-listing.tsx +++ b/ui/src/components/post-listing.tsx @@ -169,7 +169,7 @@ export class PostListing extends Component { )}
-
+
{
{post.url && ( - +