diff --git a/page-js.html b/page-js.html
index e78be2b..07a87dc 100644
--- a/page-js.html
+++ b/page-js.html
@@ -127,7 +127,8 @@
const setModalData = (element) => {
const inputs = studentForm.querySelectorAll("input[required]");
inputs.forEach((input) => {
- input.value = element ? element[input.getAttribute("id")] : "";
+ const control = input;
+ control.value = element ? element[input.getAttribute("id")] : "";
});
const idInput = studentForm.querySelector("#id");
idInput.value = element ? element.id : "";