1
0
Fork 0
mirror of synced 2024-06-20 03:30:30 +12:00

Update form.js

This commit is contained in:
Torsten Dittmann 2021-04-06 13:51:59 +02:00 committed by GitHub
parent 7ee487a0cb
commit 3c7b62d889
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,6 +42,12 @@
let ref = json;
if (name && 'FORM' !== element.tagName) {
if (name.startsWith('[')) { // Check for array names
let splitName = name.split('.');
if (splitName.length > 1 && splitName[0].endsWith(']')) {
name = splitName[splitName.length-1];
}
}
if ('FIELDSET' === element.tagName) { // Fieldset Array / Object
if (castTo === 'object') {
@ -118,4 +124,4 @@
}
}, true, false);
})(window);
})(window);