forked from CGM_Public/pretix_original
Fix addressform handling reloading address-info while XHR-request is still running (Z#23210723) (#5558)
* Fix handling answers with null-value * fix handling re-requesting the same url while XHR is still running
This commit is contained in:
committed by
GitHub
parent
d9572420eb
commit
0f25a1d6c8
@@ -168,7 +168,7 @@ function questions_init_profiles(el) {
|
||||
for (var p of profiles) {
|
||||
data = {};
|
||||
for (var key of Object.keys(p)) {
|
||||
if (key.startsWith("_")) {
|
||||
if (key.startsWith("_") || p[key] === null) {
|
||||
continue;
|
||||
}
|
||||
matched_field = getMatchingInput(key, p[key], scope);
|
||||
@@ -230,6 +230,7 @@ function questions_init_profiles(el) {
|
||||
// _0 and _1 are e.g. for phone-fields. name-fields have their parts/keys already split
|
||||
var $fields = $('[name$="' + key + '"], [name$="' + key + '_0"], [name$="' + key + '_1"]', scope).not(":disabled");
|
||||
if ($fields.length) return $fields;
|
||||
if (!answer) return null;
|
||||
|
||||
if (answer.identifier) {
|
||||
$label = $('[data-identifier="' + answer.identifier + '"]', scope);
|
||||
|
||||
Reference in New Issue
Block a user