Skip to content

Commit c61156e

Browse files
bfederlepranavs
authored andcommitted
Providing invalid values for gateway, netmask etc in the zoneWizard blocks the VLAN container to load , throwing an error
1 parent 9a44ecf commit c61156e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎ui/scripts/ui/utils.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@
2323

2424
$($form.serializeArray()).each(function() {
2525
var dataItem = data[this.name];
26-
var value = this.value;
26+
var value = this.value.toString();
2727

2828
if (options.escapeSlashes) {
2929
value = value.replace(/\//g, '__forwardSlash__');
3030
}
3131

3232
if (!dataItem) {
3333
data[this.name] = value;
34-
} else if (dataItem && !$(dataItem).size()) {
34+
} else if (dataItem && !$.isArray(dataItem)) {
3535
data[this.name] = [dataItem, value];
36-
} else {
36+
} else if($.isArray(dataItem)){
3737
dataItem.push(value);
3838
}
3939
});

0 commit comments

Comments
 (0)