Closed SoCariEVE closed 4 years ago
I've actually already solved this before submitting the issue. I'm just documenting here because it's a useful process to help me learn. The jQuery ajax()
function can take a settings
object with a complete
key:
https://api.jquery.com/Jquery.ajax/#jQuery-ajax-settings
Its value is a function which is executed only when the AJAX query completes. Moving document.location.reload()
into this function seems to fix the race condition.
Nice. Thank you very much. Is this fix commited to the dev branch?
Under normal operation, adding and removing structure timers can often fail. However, interrupting execution of the
postNewTimer()
andpostDelTimer()
functions with a debugger allows these operations to succeed.There appears to be a race condition here.