Skip to content

Commit

Permalink
Fix Haxe 5.0 null-safety issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeRanDev committed Nov 26, 2024
1 parent ccda4e6 commit d0bb1f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/reflaxe/compiler/TargetCodeInjection.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d0bb1f9

Please sign in to comment.