Workaround for new blueprints. Force select with null value to empty string

This commit is contained in:
Djamil Legato
2016-03-02 11:59:34 -08:00
parent 5597edfe9e
commit 6ab173df4a
2 changed files with 9 additions and 4 deletions

View File

@@ -90,6 +90,7 @@ export default class FormState {
field = $(field);
let name = field.prop('name');
let type = field.prop('type');
let tag = field.prop('tagName').toLowerCase();
let value;
switch (type) {
@@ -101,6 +102,10 @@ export default class FormState {
value = field.val();
}
if (tag === 'select' && value === null) {
value = '';
}
if (name && !~this.options.ignore.indexOf(name)) {
values[name] = value;
}

File diff suppressed because one or more lines are too long