Skip to content

Commit 6e96780

Browse files
committed
Add native tauri check
1 parent f49e973 commit 6e96780

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/js/utils/checkBrowserCompatibilty.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,13 @@ export function isCapacitorWeb() {
3434
return false;
3535
}
3636

37+
export function isTauri() {
38+
return "__TAURI_INTERNALS__" in window;
39+
}
40+
3741
export function checkBrowserCompatibility() {
3842
const webSerial = "serial" in navigator;
39-
const isNative = Capacitor.isNativePlatform();
43+
const isNative = Capacitor.isNativePlatform() || isTauri();
4044
const isChromium = isChromiumBrowser();
4145

4246
const compatible = isNative || (webSerial && isChromium);

0 commit comments

Comments
 (0)