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

fixed Context.definedValue returning "null" string

Nicolas Cannasse 12 жил өмнө
parent
commit
1e461dbf31

+ 2 - 1
std/haxe/macro/Context.hx

@@ -123,7 +123,8 @@ class Context {
 		Returns the value defined through -D key=value
 	**/
 	public static function definedValue( key : String ) : String {
-		return new String(load("defined_value", 1)(untyped key.__s));
+		var d = load("defined_value", 1)(untyped key.__s);
+		return d == null ? null : new String(d);
 	}
 
 	/**