🐛 Fixed members form missing data-members-name (#12250)

refs #12249

This was incorrectly assuming the presence of the data-members-name
element in the document. By guarding against it and defaulting to
undefined, we fallback to the existing behaviour when the element is not
present.
This commit is contained in:
Fabien 'egg' O'Carroll 2020-10-01 18:05:23 +01:00 committed by GitHub
parent 244704156c
commit ce14d8113a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ Array.prototype.forEach.call(document.querySelectorAll('form[data-members-form]'
var emailInput = event.target.querySelector('input[data-members-email]');
var nameInput = event.target.querySelector('input[data-members-name]');
var email = emailInput.value;
var name = nameInput.value;
var name = nameInput && nameInput.value || undefined;
var emailType = undefined;
var labels = [];

File diff suppressed because one or more lines are too long