From 98d1e83c487bbaac96ba0985d4dbb40ca58289ef Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 29 Oct 2026 08:40:09 -0400 Subject: [PATCH] fix: Only detect the Outline desktop app, not any Electron browser (#14387) --- app/utils/Desktop.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/utils/Desktop.ts b/app/utils/Desktop.ts index fd0bbe3b6e..19eebcfe8a 100644 --- a/app/utils/Desktop.ts +++ b/app/utils/Desktop.ts @@ -33,10 +33,15 @@ export default class Desktop { } /** - * Returns true if the client is running in a desktop app. + * Returns true if the client is running in the Outline desktop app. Other + * Electron based browsers also include "Electron" in the user agent, so the + * app name token is required too. + * + * @returns true if the client is the Outline desktop app. */ static isElectron() { - return navigator?.userAgent?.includes("Electron"); + const userAgent = navigator?.userAgent ?? ""; + return userAgent.includes("Electron/") && userAgent.includes("Outline/"); } /**