summaryrefslogtreecommitdiff
path: root/source/features/deep-reblame.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'source/features/deep-reblame.tsx')
-rw-r--r--source/features/deep-reblame.tsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/features/deep-reblame.tsx b/source/features/deep-reblame.tsx
index 637ab008..08f96012 100644
--- a/source/features/deep-reblame.tsx
+++ b/source/features/deep-reblame.tsx
@@ -10,12 +10,11 @@ import features from '.';
import * as api from '../github-helpers/api';
import GitHubURL from '../github-helpers/github-url';
import LoadingIcon from '../github-helpers/icon-loading';
-import {getRepoGQL} from '../github-helpers';
import looseParseInt from '../helpers/loose-parse-int';
const getPullRequestBlameCommit = mem(async (commit: string, prNumber: number, currentFilename: string): Promise<string> => {
const {repository} = await api.v4(`
- repository(${getRepoGQL()}) {
+ repository() {
file: object(expression: "${commit}:${currentFilename}") {
id
}
@@ -64,7 +63,7 @@ async function redirectToBlameCommit(event: delegate.Event<MouseEvent, HTMLAncho
blameElement.blur(); // Hide tooltip after click, it’s shown on :focus
const blameHunk = blameElement.closest('.blame-hunk')!;
- const prNumber = looseParseInt(select('.issue-link', blameHunk)!.textContent!);
+ const prNumber = looseParseInt(select('.issue-link', blameHunk)!);
const prCommit = select<HTMLAnchorElement>('a.message', blameHunk)!.pathname.split('/').pop()!;
const blameUrl = new GitHubURL(location.href);