Skip to content

Commit 4a7eb9d

Browse files
committed
sanity check
1 parent 8ad3ba6 commit 4a7eb9d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/serial_web_bluetooth.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
}
1212

1313
function checkCompatibility() {
14-
if (navigator.bluetooth.requestDevice.toString().indexOf('callExtension') >= 0) {
14+
if (navigator.bluetooth.requestDevice &&
15+
navigator.bluetooth.requestDevice.toString().indexOf('callExtension') >= 0) {
1516
console.log("Using Urish's Windows 10 Web Bluetooth Polyfill");
1617
} else if (navigator.platform.indexOf("Win")>=0 &&
1718
(navigator.userAgent.indexOf("Chrome/")>=0)) {

0 commit comments

Comments
 (0)