Skip to content

Commit

Permalink
fix: share preview
Browse files Browse the repository at this point in the history
  • Loading branch information
purocean committed Jan 16, 2025
1 parent 3d59f74 commit 956c311
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/renderer/plugins/status-bar-repository-switch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ export default {
const initFilePath = $args().get('init-file')

if (initRepoName) {
ctx.repo.setCurrentRepo(initRepoName)
try {
ctx.repo.setCurrentRepo(initRepoName)
} catch (error) {
console.error(error)
}
}

if (initFilePath) {
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/services/indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const workerURL = new URL(workerUrl, import.meta.url)
const searchParams = new URLSearchParams(window.location.search)

for (const [key, value] of searchParams) {
if (key.startsWith('init-') || key === 'token') continue // ignore init-xxx and token

workerURL.searchParams.set(key, value)
}

Expand Down

0 comments on commit 956c311

Please sign in to comment.