Skip to content

Commit 52f2b16

Browse files
committed
remove Array.forEach
1 parent 57b75bf commit 52f2b16

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Gustiawan/FormBuilder/views/components/base.blade.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<form action="{{ $form->action }}"
2-
method="{{ $form->method != "GET" ? "POST" : "GET" }}"
1+
<form action="{{ $form->action }}"
2+
method="{{ $form->method != "GET" ? "POST" : "GET" }}"
33
class="flex justify-center"
44
@if ($form->hasUpload)
55
enctype="multipart/form-data"
@@ -25,7 +25,9 @@ function loadDataFor(element, field, url) {
2525
}
2626
2727
function fetchField(field, values) {
28-
field.children.forEach(el => el.remove())
28+
for (let i = 0 ; i < field.children.length ; i++) {
29+
field.children[i].remove();
30+
}
2931
values.then(data => {
3032
field.innerText = ''
3133
let options = []

0 commit comments

Comments
 (0)