Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
refactor(#10589): drop dead branches flagged by coverage
Elian Doran9a97aea35ec5
diff --git a/apps/client/src/services/share_link.ts b/apps/client/src/services/share_link.tsindex 64cdd02e55..e72b5278bb 100644--- a/apps/client/src/services/share_link.ts+++ b/apps/client/src/services/share_link.ts@@ -16,12 +16,5 @@ export function buildShareLink(shareId: string, syncServerHost: string | null |return new URL(`/share/${shareId}`, window.glob.httpBaseUrl).href;}- let host = location.host;- if (host.endsWith("/")) {- // seems like IE has trailing slash- // https://github.com/zadam/trilium/issues/3782- host = host.substring(0, host.length - 1);- }-- return `${location.protocol}//${host}${location.pathname}share/${shareId}`;+ return `${location.protocol}//${location.host}${location.pathname}share/${shareId}`;}diff --git a/apps/desktop/src/composite_messaging_provider.ts b/apps/desktop/src/composite_messaging_provider.tsindex 175b1e4a40..b184dbf2d4 100644--- a/apps/desktop/src/composite_messaging_provider.ts+++ b/apps/desktop/src/composite_messaging_provider.ts@@ -55,11 +55,12 @@ export default class CompositeMessagingProvider implements MessagingProvider {}getClientCount(): number {- return (this.ipc.getClientCount?.() ?? 0) + (this.ws.getClientCount?.() ?? 0);+ // Both concrete legs implement these unconditionally, so no optional-call guard.+ return this.ipc.getClientCount() + this.ws.getClientCount();}dispose(): void {- this.ipc.dispose?.();- this.ws.dispose?.();+ this.ipc.dispose();+ this.ws.dispose();}}