Just wanted to report possible JS bug: I tried various reload page instructions but they all fail most times. However, the problem seems "resolved" by adding a console.log() line before. Is this a normal JS behaviour? My problematic code chunk is the following:
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.
};
});