We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9da13d commit e6b5ae4Copy full SHA for e6b5ae4
src/lib/tauri-mock.ts
@@ -3,8 +3,13 @@
3
* This allows running `npm run dev` without Tauri
4
*/
5
6
-// Check if running in Tauri
7
-export const isTauri = typeof window !== 'undefined' && '__TAURI__' in window;
+// Check if running in Tauri - check multiple indicators
+export const isTauri = typeof window !== 'undefined' && (
8
+ '__TAURI__' in window ||
9
+ '__TAURI_INTERNALS__' in window ||
10
+ window.location.protocol === 'tauri:' ||
11
+ window.location.protocol === 'https:' && window.location.hostname === 'tauri.localhost'
12
+);
13
14
// Mock data
15
const mockPreferences = {
0 commit comments