Answer the question
In order to leave comments, you need to log in
How to prevent the function from advancing further?
Good evening. I'm new to js, I won't post the full component as it's almost 500 lines long and it will be a pain to understand it.
async created(){
await this.getUserCheckList();
....последующие функции и обработка данных.
}
methods:{
async getUsersCheckList(){
await axios.get(this.userListUrl).then((x)=>{this.usernameSlugList = x.data.slug; this.emailSlugList =
x.data.email_slug}).catch((e)=>{this.handleUsersListErrors(e)});
},
async handleUsersListErrors(e){
if (!e.status){
await setTimeout(()=> this.getUsersCheckList(), 10000);
}
},
}
Answer the question
In order to leave comments, you need to log in
await setTimeout
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question