We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2bc8048 commit cf74c31Copy full SHA for cf74c31
sources/net.sf.j2s.java.core/srcjs/js/j2sClazz.js
@@ -3688,7 +3688,7 @@ function(i){
3688
3689
m$(Integer,"parseInt$S$I",
3690
function(s,radix){
3691
- var v = (s.indexOf(".") >= 0 ? NaN : parseInt(s, radix));
+ var v = (s == null || s.indexOf(".") >= 0 ? NaN : parseInt(s, radix));
3692
if (!isNaN(v)) {
3693
// check for trailing garbage
3694
var v1 = parseInt(s + "1", radix);
@@ -3704,7 +3704,7 @@ return v;
3704
3705
m$(Integer,"parseInt$S",
3706
function(s){
3707
- var v = +s;
+ var v = (s == null ? NaN : +s);
3708
if (isNaN(v))
3709
s= "?" + s; // just to ensure it gets trapped
3710
return Integer.parseInt$S$I(s, 10);
0 commit comments