Skip to content

Commit 8084671

Browse files
Prefer forEach over index-based for loop
Co-authored-by: Paul Robert Lloyd <paulrobertlloyd@users.noreply.github.com>
1 parent 576aeff commit 8084671

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/controllers/book-into-a-clinic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ export const bookIntoClinicController = {
315315

316316
booking.addAppointment(appointment)
317317
}
318-
for (let index = 0; index < childrenToRemove; index++) {
318+
Array.from({ length: childrenToRemove }).forEach(() => {
319319
const appointment_uuid = booking.removeLastAppointment()
320320
ClinicAppointment.delete(appointment_uuid, data.wizard)
321321
}

0 commit comments

Comments
 (0)