Skip to content

Commit d12fc37

Browse files
committed
Darn, if we don't double-decorate "issue add comment" then there's nothing at unit-test time because the comment field is dynamically populated...
1 parent 1c2ab3f commit d12fc37

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

browser-extension/src/lib/enhancers/github/githubIssueAddComment.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ export class GitHubIssueAddCommentEnhancer implements CommentEnhancer<GitHubIssu
2020
return ['GH_ISSUE_ADD_COMMENT']
2121
}
2222

23-
tryToEnhance(_textarea: HTMLTextAreaElement): GitHubIssueAddCommentSpot | null {
23+
tryToEnhance(textarea: HTMLTextAreaElement): GitHubIssueAddCommentSpot | null {
24+
if (textarea.id === 'feedback') {
25+
return null
26+
}
2427
if (document.querySelector('meta[name="hostname"]')?.getAttribute('content') !== 'github.com') {
2528
return null
2629
}
@@ -31,6 +34,7 @@ export class GitHubIssueAddCommentEnhancer implements CommentEnhancer<GitHubIssu
3134
const match = window.location.pathname.match(/^\/([^/]+)\/([^/]+)(?:\/issues\/(\d+))/)
3235
logger.debug(`${this.constructor.name} found match`, window.location.pathname)
3336
if (!match) return null
37+
3438
const [, owner, repo, numberStr] = match
3539
const slug = `${owner}/${repo}`
3640
const number = parseInt(numberStr!, 10)

0 commit comments

Comments
 (0)