Skip to content

Commit

Permalink
Fix $global.$haxeUID being undefined in commonjs when compiling with …
Browse files Browse the repository at this point in the history
…Haxe 4

$global.$haxeUID |= 0 ensures that it's not undefined, but also won't change any numeric value > 0.

Perhaps an issue with hxgenjs?
  • Loading branch information
joshtynjala committed Feb 3, 2025
1 parent f27a381 commit 60abc97
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/motion/Actuate.hx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ import flash.display.DisplayObject;


class Actuate {

#if commonjs
@:noCompletion private static function __init__()
{
untyped #if haxe4 js.Syntax.code #else __js__ #end ("$global.$haxeUID |= 0;");
}
#end


public static var defaultActuator:Class<IGenericActuator> = SimpleActuator;
Expand Down

0 comments on commit 60abc97

Please sign in to comment.