From c61156e9651d42295a5dca554af2de73cd442ec7 Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Tue, 5 Feb 2013 11:47:20 +0530 Subject: [PATCH] Providing invalid values for gateway, netmask etc in the zoneWizard blocks the VLAN container to load , throwing an error --- ui/scripts/ui/utils.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/scripts/ui/utils.js b/ui/scripts/ui/utils.js index 567f566d96e..7a6fb2fc57f 100644 --- a/ui/scripts/ui/utils.js +++ b/ui/scripts/ui/utils.js @@ -23,7 +23,7 @@ $($form.serializeArray()).each(function() { var dataItem = data[this.name]; - var value = this.value; + var value = this.value.toString(); if (options.escapeSlashes) { value = value.replace(/\//g, '__forwardSlash__'); @@ -31,9 +31,9 @@ if (!dataItem) { data[this.name] = value; - } else if (dataItem && !$(dataItem).size()) { + } else if (dataItem && !$.isArray(dataItem)) { data[this.name] = [dataItem, value]; - } else { + } else if($.isArray(dataItem)){ dataItem.push(value); } });