mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-11 11:02:27 +08:00
fix: 🐛 Fix tab empty path behavior
This commit is contained in:
parent
b18cfb5d20
commit
ae1a4b7a80
@ -98,8 +98,7 @@ export default class TabManager extends Component {
|
|||||||
ntxId: parsedFromUrl.ntxId,
|
ntxId: parsedFromUrl.ntxId,
|
||||||
active: true,
|
active: true,
|
||||||
hoistedNoteId: parsedFromUrl.hoistedNoteId || "root",
|
hoistedNoteId: parsedFromUrl.hoistedNoteId || "root",
|
||||||
viewScope: parsedFromUrl.viewScope || {},
|
viewScope: parsedFromUrl.viewScope || {}
|
||||||
mainNtxId: null
|
|
||||||
});
|
});
|
||||||
} else if (!filteredNoteContexts.find((tab: NoteContextState) => tab.active)) {
|
} else if (!filteredNoteContexts.find((tab: NoteContextState) => tab.active)) {
|
||||||
filteredNoteContexts[0].active = true;
|
filteredNoteContexts[0].active = true;
|
||||||
@ -279,10 +278,7 @@ export default class TabManager extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async openInNewTab(targetNoteId: string, hoistedNoteId: string | null = null) {
|
async openInNewTab(targetNoteId: string, hoistedNoteId: string | null = null) {
|
||||||
const noteContext = await this.openEmptyTab(
|
const noteContext = await this.openEmptyTab(null, hoistedNoteId || this.getActiveContext()?.hoistedNoteId);
|
||||||
null,
|
|
||||||
hoistedNoteId || this.getActiveContext()?.hoistedNoteId
|
|
||||||
);
|
|
||||||
|
|
||||||
await noteContext.setNote(targetNoteId);
|
await noteContext.setNote(targetNoteId);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user