Skip to content

Commit 31e7be6

Browse files
committed
Add native tauri check
1 parent 71bbcaf commit 31e7be6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/js/utils/checkBrowserCompatibility.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,17 @@ export function isCapacitorWeb() {
6060
return false;
6161
}
6262

63+
export function isTauri() {
64+
return "__TAURI_INTERNALS__" in window;
65+
}
66+
6367
export function checkBrowserCompatibility() {
6468
const isWebSerial = checkWebSerialSupport();
6569
const isWebBluetooth = checkWebBluetoothSupport();
6670
const isWebUSB = checkWebUSBSupport();
6771
const isChromium = isChromiumBrowser();
6872

69-
const isNative = Capacitor.isNativePlatform();
73+
const isNative = Capacitor.isNativePlatform() || isTauri();
7074

7175
const compatible = isNative || (isChromium && (isWebSerial || isWebBluetooth || isWebUSB));
7276

0 commit comments

Comments
 (0)