File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -1206,20 +1206,27 @@ class G2coreAPI extends EventEmitter {
12061206
12071207 for ( let i = 0 ; i < results . length ; i ++ ) {
12081208 let item = results [ i ] ;
1209+ let x ;
12091210
12101211 if ( process . platform === 'win32' ) {
12111212 // Windows:
12121213 // pnpId: USB\VID_1D50&PID_606D&MI_00\6&3B3CEA53&0&0000
12131214 // pnpId: USB\VID_1D50&PID_606D&MI_02\6&3B3CEA53&0&0002
1215+ // pnpId: USB\VID_1D50&PID_606D\0084-D639-0084-08C6
12141216
12151217 // WARNING -- explicit test against VIP/PID combo.
1216- if ( ( x = item . pnpId . match ( / ^ U S B \\ V I D _ ( [ 0 - 9 A - F a - f ] + ) & P I D _ ( [ 0 - 9 A - F a - f ] + ) & M I _ ( [ 0 - 9 ] + ) \\ ( .* ) $ / ) ) && // eslint-disable-line
1218+ if ( ( x = item . pnpId . match ( / ^ U S B \\ V I D _ ( [ 0 - 9 A - F a - f ] + ) & P I D _ ( [ 0 - 9 A - F a - f ] + ) (?: (?: & M I _ ( [ 0 - 9 ] + ) \\ ( .* ) ) | (?: \\ ( . * ) ) ) $ / ) ) && // eslint-disable-line
12171219 ( x [ 1 ] == '1D50' ) && ( x [ 2 ] == '606D' )
12181220 ) {
1221+ let serialNumber ;
12191222 // let vendor = x[1]; // never used
12201223 // let pid = x[2]; // never used
1221- let theRest = x [ 4 ] . split ( '&' ) ;
1222- let serialNumber = theRest [ 1 ] ;
1224+ if ( x [ 4 ] ) {
1225+ let theRest = x [ 4 ] . split ( '&' ) ;
1226+ serialNumber = theRest [ 1 ] ;
1227+ } else {
1228+ serialNumber = x [ 5 ] ;
1229+ }
12231230
12241231 if (
12251232 ( g2s . length > 0 ) &&
You can’t perform that action at this time.
0 commit comments