diff --git a/src/PassReset/formHandler.js b/src/PassReset/formHandler.js index d59fa04..bae54e5 100644 --- a/src/PassReset/formHandler.js +++ b/src/PassReset/formHandler.js @@ -1,6 +1,6 @@ const formEl = document.getElementById("reset"); -formEl.addEventListener('submit', () => { - event.preventDefault(); +formEl.addEventListener('submit', (listener) => { + listener.preventDefault(); const formData = new FormData(formEl); if(formData.get("newPW") === formData.get("newPWConfirm")){ formData.delete("newPWConfirm");