This commit is contained in:
Vanessa 2023-10-12 11:14:29 +08:00
parent f0f55d3b02
commit c5206f7084

View file

@ -695,9 +695,10 @@ app.whenReady().then(() => {
return;
}
const ids = decodeURIComponent(new URL(item.webContents.getURL()).hash.substring(1)).split("\u200b");
if (ids.includes(data.options.rootID) || ids.includes(data.options.assetPath)) {
const options = JSON.parse(data.options);
if (ids.includes(options.rootID) || ids.includes(options.assetPath)) {
item.focus();
item.webContents.send("siyuan-open-file", data.options);
item.webContents.send("siyuan-open-file", options);
hasMatch = true;
return true;
}