@@ -110,8 +110,9 @@ export class CoderApi extends Api {
110110 options ?: ClientOptions ,
111111 ) => {
112112 const searchParams = new URLSearchParams ( { follow : "true" } ) ;
113- if ( logs . length ) {
114- searchParams . append ( "after" , logs [ logs . length - 1 ] . id . toString ( ) ) ;
113+ const lastLog = logs . at ( - 1 ) ;
114+ if ( lastLog ) {
115+ searchParams . append ( "after" , lastLog . id . toString ( ) ) ;
115116 }
116117
117118 return this . createWebSocket < ProvisionerJobLog > ( {
@@ -311,9 +312,9 @@ function setupInterceptors(
311312 output ,
312313 ) ;
313314 // Add headers from the header command.
314- Object . entries ( headers ) . forEach ( ( [ key , value ] ) => {
315+ for ( const [ key , value ] of Object . entries ( headers ) ) {
315316 config . headers [ key ] = value ;
316- } ) ;
317+ }
317318
318319 // Configure proxy and TLS.
319320 // Note that by default VS Code overrides the agent. To prevent this, set
@@ -425,7 +426,7 @@ function wrapResponseTransform(
425426function getSize ( headers : AxiosHeaders , data : unknown ) : number | undefined {
426427 const contentLength = headers [ "content-length" ] ;
427428 if ( contentLength !== undefined ) {
428- return parseInt ( contentLength , 10 ) ;
429+ return Number . parseInt ( contentLength , 10 ) ;
429430 }
430431
431432 return sizeOf ( data ) ;
0 commit comments