From d0bb1f955e229e64e96f06db8fb06fb0f007441f Mon Sep 17 00:00:00 2001 From: Robert Borghese <28355157+SomeRanDev@users.noreply.github.com> Date: Tue, 26 Nov 2024 16:56:17 -0500 Subject: [PATCH] Fix Haxe 5.0 null-safety issue --- src/reflaxe/compiler/TargetCodeInjection.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/reflaxe/compiler/TargetCodeInjection.hx b/src/reflaxe/compiler/TargetCodeInjection.hx index 9a2cc17..f308030 100644 --- a/src/reflaxe/compiler/TargetCodeInjection.hx +++ b/src/reflaxe/compiler/TargetCodeInjection.hx @@ -67,7 +67,8 @@ class TargetCodeInjection { // Find all instances of {NUMBER} and replace with argument if possible ~/{(\d+)}/g.map(injectionString, function(ereg) { final num = Std.parseInt(ereg.matched(1)); - return (num != null ? getArg(num) : null) ?? ereg.matched(0); + final num = num != null ? getArg(num) : null; + return num ?? ereg.matched(0); }); } else { null;