I have this javascript method:
function waitcheck(){
if(wait == 0){
offlineUpload()
}
else{
setTimeout(waitcheck(), 2000)
}
}
I'm lost, right now I'm getting an error saying "Maximum stack size exceeded"
The goal of this method is to wait until a var is turned into "0" by an async function.
Is there a better way to do this?
How can I get around this error?