From 579afb1fae65bc4cd7ef22e6526fce510133d731 Mon Sep 17 00:00:00 2001 From: Federico Brigante Date: Wed, 10 May 2023 22:58:08 +0800 Subject: Default branch and current branch detector improvements (#6636) --- source/features/fork-source-link-same-view.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/features/fork-source-link-same-view.tsx') diff --git a/source/features/fork-source-link-same-view.tsx b/source/features/fork-source-link-same-view.tsx index bfe4de90..fd0de58b 100644 --- a/source/features/fork-source-link-same-view.tsx +++ b/source/features/fork-source-link-same-view.tsx @@ -4,7 +4,7 @@ import * as pageDetect from 'github-url-detection'; import features from '../feature-manager.js'; import GitHubURL from '../github-helpers/github-url.js'; import doesFileExist from '../github-helpers/does-file-exist.js'; -import getDefaultBranch from '../github-helpers/get-default-branch.js'; +import {getDefaultBranchOfRepo} from '../github-helpers/get-default-branch.js'; import {getRepo, getForkedRepo} from '../github-helpers/index.js'; const isFilePath = (): boolean => @@ -34,7 +34,7 @@ async function getEquivalentURL(): Promise { }); if (isFilePath()) { - sameViewUrl.branch = await getDefaultBranch(forkedRepository); + sameViewUrl.branch = await getDefaultBranchOfRepo(forkedRepository); if (!await doesFileExist(sameViewUrl)) { return defaultUrl; } -- cgit v1.2.3