Skip to content

Commit 60abc97

Browse files
committed
Fix $global.$haxeUID being undefined in commonjs when compiling with 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?
1 parent f27a381 commit 60abc97

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/motion/Actuate.hx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ import flash.display.DisplayObject;
1919

2020

2121
class Actuate {
22+
23+
#if commonjs
24+
@:noCompletion private static function __init__()
25+
{
26+
untyped #if haxe4 js.Syntax.code #else __js__ #end ("$global.$haxeUID |= 0;");
27+
}
28+
#end
2229

2330

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

0 commit comments

Comments
 (0)