不要怂,就是干,撸起袖子干!

Commit d37d3f7d by jchbh-duplicate

Only do parseInt when value is an string.

OK, I test and also found for boolean(true), it is incorrect. So it will test string first.
Another Question, should we need to support string value "true" and "false" as boolean(true) and boolean(false) here?
1 parent 78cfc27f
Showing with 1 additions and 1 deletions
......@@ -316,7 +316,7 @@ module.exports = (function() {
// Bit fields are returned as buffers
value = value[0];
}
value = !!parseInt(value);
value = _.isString(value)?!!parseInt(value):!!value;
}
if (!options.raw && originalValue !== value) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!