mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-15 15:10:31 -08:00
fix: click subwiki icon not working
This commit is contained in:
parent
f2fb081a79
commit
d9991b044e
1 changed files with 6 additions and 2 deletions
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/strict-boolean-expressions */
|
||||
import { WikiChannel } from '@/constants/channels';
|
||||
import { getDefaultHTTPServerIP } from '@/constants/urls';
|
||||
import type { IAuthenticationService } from '@services/auth/interface';
|
||||
|
|
@ -58,10 +59,13 @@ export async function openWorkspaceTagTiddler(workspace: IWorkspace, service: IW
|
|||
// is not a new main workspace
|
||||
// open tiddler in the active view
|
||||
if (isSubWiki) {
|
||||
if (mainWikiID === null || idToActive === undefined || tagName === null) {
|
||||
if (!mainWikiID || !idToActive) {
|
||||
return;
|
||||
}
|
||||
await service.wiki.wikiOperationInBrowser(WikiChannel.openTiddler, mainWikiID, [tagName]);
|
||||
await service.workspaceView.setActiveWorkspaceView(mainWikiID);
|
||||
if (tagName) {
|
||||
await service.wiki.wikiOperationInBrowser(WikiChannel.openTiddler, mainWikiID, [tagName]);
|
||||
}
|
||||
} else {
|
||||
await service.wiki.requestWikiSendActionMessage('tm-home');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue