How the axios interceptor does not intercept when the condition is true

// 
axios.interceptors.request.use(function (config){
if (){
    
  }
 // 
 return config;
 }, function (error){
 // 
 return Promise.reject(error);
 });

if (condition) {

}

how should this paragraph be written in order to jump out of the current interceptor and deal with it only when the conditions do not meet

Jul.06,2021

when you jump out of the current interceptor, you should write the if condition outside the axios.interceptors and the intercept configuration item inside. Are you mistaken


you can write if (! Condition) {intercept.}


meet the conditions to enter, directly return


write like this?

if (){
    
} else {
    // 
    axios.interceptors.request.use(function (config){
        // 
        return config;
    }, function (error){
        // 
        return Promise.reject(error);
    });
}

does it feel so simple?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5099f-4460b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5099f-4460b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?