Skip to content
Snippets Groups Projects
Commit 475e5bcd authored by xamgore's avatar xamgore Committed by PavelBegunkov
Browse files

Fix NaNs problem #110

The problem was in precedence of ternary operator and + sign.

Merge branch 'fix-nan'
parent 415477a1
Branches
Tags
No related merge requests found
......@@ -19,7 +19,7 @@ $(document).ready(function () {
sum: function (asText) {
var sum = 0;
this.each(function () {
sum += parseInt(0 + asText ? $(this).text() : $(this).val())
sum += parseInt(0 + ( asText ? $(this).text() : $(this).val() ))
});
return sum;
},
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment