Skip to content

Commit

Permalink
Merge pull request gitbutlerapp#4701 from gitbutlerapp/fix-githost-fa…
Browse files Browse the repository at this point in the history
…ctory-initialization

fix githost factory initialization
  • Loading branch information
Caleb-T-Owens committed Aug 15, 2024
2 parents 84df885 + d3e3fff commit 8d1cb49
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/desktop/src/routes/[projectId]/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
const showHistoryView = persisted(false, 'showHistoryView');
const octokit = $derived(accessToken ? octokitFromAccessToken(accessToken) : undefined);
const gitHostFactory = $derived(octokit ? new DefaultGitHostFactory(octokit) : undefined);
const gitHostFactory = $derived(new DefaultGitHostFactory(octokit));
const repoInfo = $derived(remoteUrl ? parseRemoteUrl(remoteUrl) : undefined);
const forkInfo = $derived(forkUrl && forkUrl !== remoteUrl ? parseRemoteUrl(forkUrl) : undefined);
const baseBranchName = $derived($baseBranch?.shortName);
Expand Down Expand Up @@ -118,8 +118,9 @@
$effect.pre(() => {
const gitHost =
repoInfo && baseBranchName
? gitHostFactory?.build(repoInfo, baseBranchName, forkInfo)
? gitHostFactory.build(repoInfo, baseBranchName, forkInfo)
: undefined;
const ghListService = gitHost?.listService();
listServiceStore.set(ghListService);
Expand Down

0 comments on commit 8d1cb49

Please sign in to comment.