diff --git a/src/js/lib/helper.js b/src/js/lib/helper.js index 8226db4..14f49b6 100644 --- a/src/js/lib/helper.js +++ b/src/js/lib/helper.js @@ -8,7 +8,7 @@ var cls = require('./class') exports.toInt = function (x) { if (typeof x === 'string') { - return parseInt(x, 10); + return parseInt(x, 10) || 0; } else { return ~~x; }