Skip to content

Commit

Permalink
fix: 修复 setup 警告
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Mar 6, 2024
1 parent b61d420 commit ee3f1b7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/utils/siyuanUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

import { SiyuanKernelApi } from "zhi-siyuan-api"
import { StrUtil } from "zhi-common"
import { useRoute } from "vue-router"
import { createAppLogger } from "~/src/utils/appLogger.ts"
import { useSiyuanDevice } from "~/src/composables/useSiyuanDevice.ts"
import { BrowserUtil } from "zhi-device"
Expand Down Expand Up @@ -119,8 +118,7 @@ export const getSiyuanPageId = async (pageId?: string, force?: boolean) => {
// 3、开发模式模拟传递一个ID
if (BrowserUtil.isInBrowser) {
// 尝试从url参数解析ID
const route = useRoute()
const paramsPageId = route?.params?.id as string
const paramsPageId = BrowserUtil.getQueryParam("id")
if (!StrUtil.isEmptyString(paramsPageId)) {
return paramsPageId
}
Expand Down

0 comments on commit ee3f1b7

Please sign in to comment.