fix: Re-enable interim series "add session" button (#5485)

Fixes #5478

Co-authored-by: Nicolas Giard <github@ngpixel.com>
This commit is contained in:
Lars Eggert 2023-04-26 00:30:06 +03:00 committed by GitHub
parent ec7b974d52
commit 732cecf0e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,13 +44,15 @@ const interimRequest = (function() {
// increment formset counter
template.find(':input')
.each(function () {
const name = $(this)
.attr('name')
.replace('-' + (total - 1) + '-', '-' + total + '-');
let name = $(this)
.attr('name');
if (name) {
name.replace('-' + (total - 1) + '-', '-' + total + '-');
const id = 'id_' + name;
$(this)
.attr({ name: name, id: id })
.val('');
}
});
template.find('label')