File tree Expand file tree Collapse file tree 4 files changed +20
-4
lines changed
Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 1+ {
2+ // Use IntelliSense to learn about possible attributes.
3+ // Hover to view descriptions of existing attributes.
4+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+ "version" : " 0.2.0" ,
6+ "configurations" : [],
7+ "console" : " integratedTerminal" ,
8+ "outputCapture" : " std"
9+ }
Original file line number Diff line number Diff line change 253253 "typescript" : " ^4.3.2"
254254 },
255255 "dependencies" : {
256- "systeminformation" : " 5.12.3 "
256+ "systeminformation" : " 5.23.5 "
257257 },
258258 "bugs" : {
259259 "url" : " https://github.com/isontheline/vscode-sysmon/issues"
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class Command {
2626 env . clipboard . writeText ( ip ) ;
2727 window . showInformationMessage ( `The IP ${ ip } was copied successfully` ) ;
2828 } else {
29- window . showInformationMessage ( `Not found IP ` ) ;
29+ window . showInformationMessage ( `IP Not Found ` ) ;
3030 }
3131 } catch ( err ) {
3232 if ( err instanceof Error ) {
Original file line number Diff line number Diff line change @@ -39,8 +39,15 @@ export async function getLoadavg() {
3939export async function getIP ( ) {
4040 const defaultInterface = await si . networkInterfaceDefault ( ) ;
4141 const res = await si . networkInterfaces ( ) ;
42- const cur = res . find ( item => item . iface === defaultInterface ) ;
43- return cur ?. ip4 ;
42+ if ( ! Array . isArray ( res ) ) {
43+ return res . ip4 ;
44+ }
45+ for ( const item of res ) {
46+ if ( item . iface === defaultInterface ) {
47+ return item . ip4 ;
48+ }
49+ }
50+ return null ;
4451}
4552
4653export async function getNetworkSpeed ( ) {
You can’t perform that action at this time.
0 commit comments