Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

210
Views
Varias instrucciones de la página de recarga de JS fallan si no van precedidas por console.log()

Solo quería informar un posible error de JS: probé varias instrucciones de recarga de la página, pero todas fallan la mayoría de las veces. Sin embargo, el problema parece "resuelto" al agregar una línea console.log() antes. ¿Es este un comportamiento normal de JS? Mi fragmento de código problemático es el siguiente:

 myForm.addEventListener('submit', (event) => { let fields = [verifyPassword, updateText]; if (fields.some(field=>(field.value === '' || field.value === null || field.value === NaN))){ event.preventDefault(); alert('Fill in the form!'); } else { console.log("Now this page should reload..."); // if this line is removed, reload functions work rarely document.location.reload(true); // same happens with history.go(0) etc. }; });
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!