Skip to content

Commit d585dd3

Browse files
authored
fix: app protocol in prod (#2992)
1 parent bda17de commit d585dd3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/shared/src/constants.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import type { ElectronAPI } from "@electron-toolkit/preload"
22

3-
const isDev = process.env.NODE_ENV !== "production"
4-
53
declare const globalThis: {
64
window: Window & {
75
electron?: ElectronAPI
@@ -10,6 +8,7 @@ declare const globalThis: {
108
electron?: ElectronAPI
119
}
1210

11+
const isDev = "process" in globalThis ? process.env.NODE_ENV === "development" : import.meta.env.DEV
1312
export const APP_PROTOCOL = isDev ? "follow-dev" : "follow"
1413
export const DEEPLINK_SCHEME = `${APP_PROTOCOL}://` as const
1514

0 commit comments

Comments
 (0)