]> Untitled Git - lemmy-ui.git/commitdiff
Fixing unban. Fixes #248
authorDessalines <tyhou13@gmx.com>
Wed, 7 Apr 2021 17:01:58 +0000 (13:01 -0400)
committerDessalines <tyhou13@gmx.com>
Wed, 7 Apr 2021 17:01:58 +0000 (13:01 -0400)
src/shared/components/post-listing.tsx

index d5d734fea9e1680c127c518823a1036cd0075301..260806272184b40770f70cab20e6a67bbc00161e 100644 (file)
@@ -1383,7 +1383,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
   }
 
   handleModBanBothSubmit(i: PostListing, event?: any) {
-    event.preventDefault();
+    if (event) event.preventDefault();
 
     if (i.state.banType == BanType.Community) {
       // If its an unban, restore all their data