From 4ff98524e61389fb7628e5816bfcdaac4e0f0cc6 Mon Sep 17 00:00:00 2001
From: yakov116 <16872793+yakov116@users.noreply.github.com>
Date: Thu, 8 Apr 2021 22:10:15 -0400
Subject: Lint (#4207)

---
 source/features/enable-file-links-in-compare-view.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'source/features/enable-file-links-in-compare-view.tsx')

diff --git a/source/features/enable-file-links-in-compare-view.tsx b/source/features/enable-file-links-in-compare-view.tsx
index 2bf1edb8..36c6e243 100644
--- a/source/features/enable-file-links-in-compare-view.tsx
+++ b/source/features/enable-file-links-in-compare-view.tsx
@@ -60,8 +60,9 @@ void features.add(__filebasename, {
 		pageDetect.isPRCommit
 	],
 	exclude: [
-		// Only enabled on Open/Draft PRs. Editing files doesn't make sense after a PR is closed/merged.
-		() => !select.exists('.gh-header-meta [title$="Open"], .gh-header-meta [title$="Draft"]'),
+		// Editing files doesn't make sense after a PR is closed/merged
+		pageDetect.isClosedPR,
+		() => select('.head-ref')!.title === 'This repository has been deleted',
 		// If you're viewing changes from partial commits, ensure you're on the latest one.
 		() => select.exists('.js-commits-filtered') && !select.exists('[aria-label="You are viewing the latest commit"]')
 	],
-- 
cgit v1.2.3

