Browse Source

charCodeAt(-1) => undefined instead of null (keep isNaN() = true behavior)

Nicolas Cannasse 13 years ago
parent
commit
def442b995
1 changed files with 1 additions and 1 deletions
  1. 1 1
      std/js/Boot.hx

+ 1 - 1
std/js/Boot.hx

@@ -221,7 +221,7 @@ class Boot {
 			String.prototype.charCodeAt = function(i) {
 				var x = __this__.cca(i);
 				if( x != x ) // fast isNaN
-					return null;
+					return __js__('undefined'); // isNaN will still return true
 				return x;
 			};
 			var oldsub = String.prototype.substr;