From 99b757488c077cee7d0ab89eeec181a7ee6290eb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 15 Nov 2022 15:00:19 +0100 Subject: Fix server lint --- server/middlewares/validators/user-subscriptions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/middlewares/validators') diff --git a/server/middlewares/validators/user-subscriptions.ts b/server/middlewares/validators/user-subscriptions.ts index d01043c17..d8d3fc28b 100644 --- a/server/middlewares/validators/user-subscriptions.ts +++ b/server/middlewares/validators/user-subscriptions.ts @@ -1,6 +1,6 @@ -import { arrayify } from '@shared/core-utils' import express from 'express' import { body, param, query } from 'express-validator' +import { arrayify } from '@shared/core-utils' import { HttpStatusCode } from '../../../shared/models/http/http-error-codes' import { areValidActorHandles, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor' import { WEBSERVER } from '../../initializers/constants' @@ -60,7 +60,7 @@ const userSubscriptionGetValidator = [ state: 'accepted' }) - if (!subscription || !subscription.ActorFollowing.VideoChannel) { + if (!subscription?.ActorFollowing.VideoChannel) { return res.fail({ status: HttpStatusCode.NOT_FOUND_404, message: `Subscription ${req.params.uri} not found.` -- cgit v1.2.3