mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-18 13:08:06 +01:00
🚨
This commit is contained in:
parent
813bd27fb3
commit
b6090f1bf3
5 changed files with 17 additions and 18 deletions
|
|
@ -58,21 +58,21 @@ export const setTabPosition = () => {
|
|||
|
||||
export const setModelsHash = () => {
|
||||
if (!isWindow()) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
let hash = ""
|
||||
let hash = "";
|
||||
getAllTabs().forEach(tab => {
|
||||
if (!tab.model) {
|
||||
const initTab = tab.headElement.getAttribute("data-initdata");
|
||||
if (initTab) {
|
||||
const initTabData = JSON.parse(initTab);
|
||||
hash += initTabData.rootId + Constants.ZWSP
|
||||
hash += initTabData.rootId + Constants.ZWSP;
|
||||
}
|
||||
} else if (tab.model instanceof Editor) {
|
||||
hash += tab.model.editor.protyle.block.rootID + Constants.ZWSP
|
||||
hash += tab.model.editor.protyle.block.rootID + Constants.ZWSP;
|
||||
} else if (tab.model instanceof Asset) {
|
||||
hash += tab.model.path + Constants.ZWSP
|
||||
hash += tab.model.path + Constants.ZWSP;
|
||||
}
|
||||
})
|
||||
window.location.hash = hash
|
||||
}
|
||||
});
|
||||
window.location.hash = hash;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue