Skip to content
Browse files

do not convert empty strings to numbers

  • Loading branch information...
1 parent 8cbcff3 commit 0697c5176cb8f91ebbddda49d1e85e8d17e4a65c @gka gka committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 js/jquery.csv.js
View
5 js/jquery.csv.js
@@ -49,7 +49,8 @@ $script.ready('jquery', function() {
});
$.each(res.rows, function(i) {
$.each(res.rows[i], function(j) {
- var n = Number(res.rows[i][j]);
+ var n = Number(res.rows[i][j]);
+ if (res.rows[i][j] == "") continue;
if (!isNaN(n) && n == res.rows[i][j])
res.rows[i][j] = n;
});
@@ -69,4 +70,4 @@ $script.ready('jquery', function() {
}
});
-});
+});

0 comments on commit 0697c51

Please sign in to comment.
Something went wrong with that request. Please try again.