Skip to content

Commit a7e4cef

Browse files
NotHyper-474AbnormalPoof
authored andcommitted
don't make array of classes and enums look nice :P
1 parent 589cad7 commit a7e4cef

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/json2object/writer/DataBuilder.hx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,14 @@ class DataBuilder {
8383
var hasDynamic:Bool = false;
8484
for (e in o)
8585
{
86-
if (Type.typeof(e) == TObject)
86+
switch (Type.typeof(e))
8787
{
88-
hasDynamic = true;
89-
break;
88+
case TObject | TClass(_) | TEnum(_):
89+
{
90+
hasDynamic = true;
91+
break;
92+
}
93+
case _:
9094
}
9195
}
9296

0 commit comments

Comments
 (0)