From a935456acab0c7bdc021829e18ce20230e18c752 Mon Sep 17 00:00:00 2001
From: yakov116 <16872793+yakov116@users.noreply.github.com>
Date: Wed, 18 Nov 2020 19:55:59 -0500
Subject: Lint (#3723)

---
 source/features/releases-tab.tsx | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

(limited to 'source/features/releases-tab.tsx')

diff --git a/source/features/releases-tab.tsx b/source/features/releases-tab.tsx
index 855fbda6..b1e7812b 100644
--- a/source/features/releases-tab.tsx
+++ b/source/features/releases-tab.tsx
@@ -10,7 +10,7 @@ import * as api from '../github-helpers/api';
 import looseParseInt from '../helpers/loose-parse-int';
 import {appendBefore} from '../helpers/dom-utils';
 import {createDropdownItem} from './more-dropdown';
-import {buildRepoURL, getRepoGQL, getRepo} from '../github-helpers';
+import {buildRepoURL, getRepo} from '../github-helpers';
 
 const getCacheKey = (): string => `releases-count:${getRepo()!.nameWithOwner}`;
 
@@ -31,7 +31,7 @@ function parseCountFromDom(): number {
 
 async function fetchFromApi(): Promise<number> {
 	const {repository} = await api.v4(`
-		repository(${getRepoGQL()}) {
+		repository() {
 			refs(refPrefix: "refs/tags/") {
 				totalCount
 			}
@@ -136,11 +136,7 @@ async function init(): Promise<false | void> {
 
 	// Update "selected" tab mark
 	if (pageDetect.isReleasesOrTags()) {
-		const selected = select('.reponav-item.selected');
-		if (selected) {
-			selected.classList.remove('js-selected-navigation-item', 'selected');
-		}
-
+		select('.reponav-item.selected')?.classList.remove('js-selected-navigation-item', 'selected');
 		releasesTab.classList.add('js-selected-navigation-item', 'selected');
 		releasesTab.dataset.selectedLinks = 'repo_releases'; // Required for ajaxLoad
 	}
-- 
cgit v1.2.3

