From: Sapan Shah Date: Fri, 31 Jan 2014 10:57:03 +0000 (-0800) Subject: Fix Helper sorting issue X-Git-Tag: autorelease-tag-v20140601202136_82eb3f9~547 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=295041b9e4b39801f822c7ab9f8b34010db5d258 Fix Helper sorting issue Fix sorting in tables, for undefined values Change-Id: Id9c09aa9b9de93f07c4063e21e6dac578d13913f Signed-off-by: Sapan Shah --- diff --git a/opendaylight/web/root/src/main/resources/js/lib.js b/opendaylight/web/root/src/main/resources/js/lib.js index 00eacdfce6..c265760b97 100644 --- a/opendaylight/web/root/src/main/resources/js/lib.js +++ b/opendaylight/web/root/src/main/resources/js/lib.js @@ -373,11 +373,11 @@ one.lib.nav = { one.lib.helper = { parseInt : function(value) { - return (value !== null && value !== '') ? + return (value != null && value.trim() !== '') ? parseInt(value) : '' }, parseFloat : function(value) { - return (value !== null && value !== '') ? + return (value != null && value.trim() !== '') ? parseFloat(value) : '' } }