This commit is contained in:
parent
87f681cce2
commit
838c3b3101
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ const openFile = (options: IOpenFileOptions) => {
|
|||
}
|
||||
// 没有初始化的页签无法检测到
|
||||
const hasEditor = getAllTabs().find(item => {
|
||||
const initData = item.headElement.getAttribute("data-initdata");
|
||||
const initData = item.headElement?.getAttribute("data-initdata");
|
||||
if (initData) {
|
||||
const initObj = JSON.parse(initData);
|
||||
if (initObj.rootID === options.rootID || initObj.blockId === options.rootID) {
|
||||
|
|
Loading…
Add table
Reference in a new issue