2
0
Эх сурвалжийг харах

[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 жил өмнө
parent
commit
df023ebaa3

+ 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("}");