This commit is contained in:
Vanessa 2023-10-26 23:49:16 +08:00
parent af5f542bc0
commit 8f15b0f4ac

View file

@ -52,13 +52,18 @@ export const getNewFilePath = (useSavePath: boolean) => {
}
/// #endif
if (!notebookId) {
window.siyuan.notebooks.find(item => {
if (!item.closed) {
notebookId = item.id;
currentPath = "/";
return true;
}
});
if (window.siyuan.mobile.editor) {
notebookId = window.siyuan.mobile.editor.protyle.notebookId;
}
if (!notebookId) {
window.siyuan.notebooks.find(item => {
if (!item.closed) {
notebookId = item.id;
currentPath = "/";
return true;
}
});
}
}
return {notebookId, currentPath};
};