Skip to content

Commit

Permalink
fix: 🐛 when the web client fails to connect to logseq, no prompt pop up.
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenull committed Nov 20, 2023
1 parent bddc487 commit ed40053
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "logseq-plugin-agenda",
"version": "3.6.0",
"version": "3.6.1",
"main": "dist/index.html",
"private": true,
"logseq": {
Expand Down Expand Up @@ -139,4 +139,4 @@
"vuepress": "2.0.0-beta.60",
"vuepress-plugin-copy-code2": "2.0.0-beta.173"
}
}
}
2 changes: 1 addition & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ async function renderApp(isVersion3 = false) {
togglePomodoro(false)
toggleAppTransparent(false)
let defaultRoute = ''
const page = await logseq.Editor.getCurrentPage()
const page = await logseq.Editor.getCurrentPage().catch((err) => console.error(err))
const { projectList = [] } = getInitialSettings()
if (projectList.some((project) => Boolean(project.id) && project.id === page?.originalName)) {
defaultRoute = `project/${encodeURIComponent(page?.originalName)}`
Expand Down
2 changes: 1 addition & 1 deletion src/pages/NewDashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const Dashboard = () => {
initializeDayjs(1)
refreshTasks().catch((error) => {
console.error('retrieve tasks failed', error)
if (import.meta.env.VITE_MODE === 'plugin') {
if (import.meta.env.VITE_MODE === 'web') {
return setConnectionErrorModal(true)
}
message.error('retrieve tasks failed')
Expand Down

0 comments on commit ed40053

Please sign in to comment.