@@ -8,7 +8,7 @@ const axiosExtra = {
88 this . defaults . baseURL = baseURL
99 } ,
1010 setHeader ( name , value , scopes = 'common' ) {
11- for ( let scope of Array . isArray ( scopes ) ? scopes : [ scopes ] ) {
11+ for ( const scope of Array . isArray ( scopes ) ? scopes : [ scopes ] ) {
1212 if ( ! value ) {
1313 delete this . defaults . headers [ scope ] [ name ] ;
1414 return
@@ -42,12 +42,12 @@ const axiosExtra = {
4242}
4343
4444// Request helpers ($get, $post, ...)
45- for ( let method of [ 'request' , 'delete' , 'get' , 'head' , 'options' , 'post' , 'put' , 'patch' ] ) {
45+ for ( const method of [ 'request' , 'delete' , 'get' , 'head' , 'options' , 'post' , 'put' , 'patch' ] ) {
4646 axiosExtra [ '$' + method ] = function ( ) { return this [ method ] . apply ( this , arguments ) . then ( res => res && res . data ) }
4747}
4848
4949const extendAxiosInstance = axios => {
50- for ( let key in axiosExtra ) {
50+ for ( const key in axiosExtra ) {
5151 axios [ key ] = axiosExtra [ key ] . bind ( axios )
5252 }
5353}
@@ -206,7 +206,7 @@ export default (ctx, inject) => {
206206 // Proxy SSR request headers headers
207207 if ( process . server && ctx . req && ctx . req . headers ) {
208208 const reqHeaders = { ...ctx . req . headers }
209- for ( let h of < %= serialize ( options . proxyHeadersIgnore ) % > ) {
209+ for ( const h of < %= serialize ( options . proxyHeadersIgnore ) % > ) {
210210 delete reqHeaders [ h ]
211211 }
212212 axiosOptions. headers . common = { ...reqHeaders , ...axiosOptions . headers . common }
0 commit comments