mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 01:20:12 +01:00
改进 getSearch 函数实现 (#7089)
* 🎨 改进 `getSearch` 方法 兼容 key 为空字符串与 value 为空字符串的 URL search params * 🎨 改进 `getSearch` 方法 * 🎨 style
This commit is contained in:
parent
4f2bca7e05
commit
67743b50ba
4 changed files with 9 additions and 19 deletions
|
|
@ -300,9 +300,9 @@ export const JSONToLayout = (isStart: boolean) => {
|
|||
}
|
||||
// https://github.com/siyuan-note/siyuan/pull/7086
|
||||
const openId = getSearch("id", window.location.href);
|
||||
if (openId) {
|
||||
if (openId !== null) {
|
||||
openFileById({
|
||||
id: getSearch("id", window.location.href),
|
||||
id: openId,
|
||||
action: [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT],
|
||||
zoomIn: getSearch("focus", window.location.href) === "1"
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue