Nicolas Cannasse 16 년 전
부모
커밋
48cf77d105
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      std/haxe/rtti/HtmlEditor.hx

+ 1 - 1
std/haxe/rtti/HtmlEditor.hx

@@ -178,7 +178,7 @@ class HtmlEditor {
 			var current = if( v == null ) null else Type.enumConstructor(v);
 			if( nullable )
 				buf.add("<option value=''>---- NULL ----</option>");
-			var prefix = e.constructors.first().name;
+			var prefix = if( e.constructors.length <= 1 ) "" else e.constructors.first().name;
 			for( c in e.constructors )
 				while( prefix.length > 0 )
 					if( c.name.substr(0,prefix.length) == prefix )