소스 검색

[js] Fixed an issue with a trailing ", "

The toString method in js StringMap was adding an extra ", " to the end of the list

Demo of issue http://try.haxe.org/#9A58e
George Corney 10 년 전
부모
커밋
df023ebaa3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      std/js/_std/haxe/ds/StringMap.hx

+ 1 - 1
std/js/_std/haxe/ds/StringMap.hx

@@ -134,7 +134,7 @@ private class StringMapIterator<T> {
 			s.add(k);
 			s.add(" => ");
 			s.add(Std.string(get(k)));
-			if( i < keys.length )
+			if( i < keys.length-1 )
 				s.add(", ");
 		}
 		s.add("}");