Skip to content

Commit 4397cd2

Browse files
[#95] Fixed case-sensitive Bluetooth port filtering that caused extra ports to appear in list.
1 parent f23388c commit 4397cd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ function scanWPorts() {
420420
// Get consistently formatted port path; If Windows, strip off possible leading port origin path for ease in comparison
421421
var portPath = ((platform === pfWin) && (port.path.indexOf(winPortOrigin) === 0)) ? port.path.slice(winPortOriginLen) : port.path;
422422
// Add only proper port types (platform specific and excluding bluetooth ports)
423-
if ((portPath.indexOf(portPattern[platform]) === 0) && (port.displayName.indexOf(' bt ') === -1 && port.displayName.indexOf('bluetooth') === -1)) {
423+
if ((portPath.indexOf(portPattern[platform]) === 0) && (port.displayName.toLowerCase().indexOf(' bt ') === -1 && port.displayName.toLowerCase().indexOf('bluetooth') === -1)) {
424424
addPort({path: port.path});
425425
}
426426
});

0 commit comments

Comments
 (0)