Przeglądaj źródła

dodge Js undefined/null issue

Simon Krajewski 10 lat temu
rodzic
commit
2075d81966

+ 1 - 1
tests/unit/src/unit/issues/Issue2497.hx

@@ -14,6 +14,6 @@ private class Object1 {
 class Issue2497 extends Test {
 	function test() {
 		var obj1 = new Object1();
-		eq("hello world null", obj1.sayHelloTo("world"));
+		eq("hello world !", obj1.sayHelloTo("world"));
 	}
 }

+ 1 - 1
tests/unit/src/unit/issues/misc/Issue2497Class.hx

@@ -2,7 +2,7 @@ package unit.issues.misc;
 
 class Issue2497Class {
 	public static var addTail: String -> String -> ?String-> String = actualFx;
-	public static function actualFx(str1:String, str2:String, ?str3:String) {
+	public static function actualFx(str1:String, str2:String, ?str3:String = "!") {
 		return str1 + " " + str2 + " " + str3;
 	}
 }