Skip to content

Commit a31caeb

Browse files
Fix next page for multi input pages (#189)
The call to `getNext` was being passed the current page's post data, rather than the form session state, meaning that conditions weren't able to read the correct data to evaluate as true. I've tested this locally but don't feel confident writing a good test in any meaningful amount of time. We'll have to test this thoroughly ourselves instead.
1 parent 5560aa7 commit a31caeb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

runner/src/server/plugins/engine/page-controllers/RepeatingFieldPageController.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,11 +322,10 @@ export class RepeatingFieldPageController extends PageController {
322322
}
323323
}
324324
}
325-
326325
if (typeof query.returnUrl !== "undefined") {
327326
return h.redirect(`${query.returnUrl}?${form_session_identifier}`);
328327
}
329-
return h.redirect(`${this.getNext(rest)}?${form_session_identifier}`);
328+
return h.redirect(`${this.getNext(savedState)}?${form_session_identifier}`);
330329
}
331330

332331
const modifyUpdate = (update) => {

0 commit comments

Comments
 (0)