Browse Source

Merge branch 'development' of https://github.com/HaxeFoundation/haxe into development

Simon Krajewski 12 năm trước cách đây
mục cha
commit
7077a0f013
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      std/haxe/macro/Context.hx

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

@@ -168,7 +168,8 @@ class Context {
 		The default value is `"1"`.
 	**/
 	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);
 	}
 
 	/**