Skip to content

Commit

Permalink
Fix Std.isOfType() being used in old Haxe versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
player-03 committed Jul 9, 2024
1 parent 221bb3d commit 5fd7060
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lime/tools/ConfigData.hx
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ abstract ConfigData(Dynamic) to Dynamic from Dynamic
continue;
}

if (valueSource != valueDest && valueDest != null && typeSource != "TObject" && !Std.isOfType(valueSource, Array))
if (valueSource != valueDest && valueDest != null && typeSource != "TObject" && !#if (haxe_ver >= 4.2) Std.isOfType #else Std.is #end(valueSource, Array))
{
if (!Reflect.hasField(destination, ARRAY + field))
{
Expand All @@ -264,7 +264,7 @@ abstract ConfigData(Dynamic) to Dynamic from Dynamic
{
mergeValues(valueSource, valueDest);
}
else if (typeDest == "TClass" && Std.isOfType(valueSource, Array) && Std.isOfType(valueDest, Array))
else if (typeDest == "TClass" && #if (haxe_ver >= 4.2) Std.isOfType #else Std.is #end (valueSource, Array) && #if (haxe_ver >= 4.2) Std.isOfType #else Std.is #end(valueDest, Array))
{
for (item in (cast valueSource:Array<Dynamic>))
{
Expand Down

0 comments on commit 5fd7060

Please sign in to comment.