File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -74,11 +74,15 @@ class Serial extends EventTarget {
7474 // Determine which protocol to use based on port path
7575 const s = typeof portPath === "string" ? portPath : "" ;
7676 // Default to webserial for typical serial device identifiers.
77- if ( s === "virtual" ) return this . _protocols . find ( ( p ) => p . name === "virtual" ) ?. instance ;
77+ if ( s === "virtual" ) {
78+ return this . _protocols . find ( ( p ) => p . name === "virtual" ) ?. instance ;
79+ }
7880 if ( s === "manual" || / ^ ( t c p | w s | w s s ) : \/ \/ [ A - Z a - z 0 - 9 . - ] + (?: : \d + ) ? ( \/ .* ) ? $ / . test ( s ) ) {
7981 return this . _protocols . find ( ( p ) => p . name === "websocket" ) ?. instance ;
8082 }
81- if ( s . startsWith ( "bluetooth" ) ) return this . _protocols . find ( ( p ) => p . name === "webbluetooth" ) ?. instance ;
83+ if ( s . startsWith ( "bluetooth" ) ) {
84+ return this . _protocols . find ( ( p ) => p . name === "webbluetooth" ) ?. instance ;
85+ }
8286 return this . _protocols . find ( ( p ) => p . name === "webserial" ) ?. instance ;
8387 }
8488
You can’t perform that action at this time.
0 commit comments