소스 검색

fix for getLocale() returning null

Nicolas Cannasse 6 년 전
부모
커밋
e42d2a9d0c
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      hxd/System.hl.hx

+ 1 - 0
hxd/System.hl.hx

@@ -288,6 +288,7 @@ class System {
 	static function get_lang() : String {
 		if( _lang == null ) {
 			var str = @:privateAccess Sys.makePath(getLocale());
+			if( str == null ) str = "en";
 			_lang = ~/[.@_-]/g.split(str)[0];
 		}
 		return _lang;