summaryrefslogtreecommitdiff
path: root/source/features/preview-hidden-comments.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'source/features/preview-hidden-comments.tsx')
-rw-r--r--source/features/preview-hidden-comments.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/features/preview-hidden-comments.tsx b/source/features/preview-hidden-comments.tsx
index ae5bbf5e..dcb49e83 100644
--- a/source/features/preview-hidden-comments.tsx
+++ b/source/features/preview-hidden-comments.tsx
@@ -5,7 +5,7 @@ import * as pageDetect from 'github-url-detection';
import features from '.';
-const allowedReasons = ['resolved', 'outdated', 'off-topic'];
+const allowedReasons = new Set(['resolved', 'outdated', 'off-topic']);
const capitalize = (text: string): string => text.charAt(0).toUpperCase() + text.slice(1);
@@ -24,7 +24,7 @@ const init = (): void => {
`, details)!;
const reason = /was marked as ([^.]+)/.exec(header.textContent!)?.[1] ?? '';
- if (!allowedReasons.includes(reason)) {
+ if (!allowedReasons.has(reason)) {
continue;
}