소스 검색

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

Nicolas Cannasse 14 년 전
부모
커밋
def442b995
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;