diff --git a/src/browser/Factory.zig b/src/browser/Factory.zig index 8a0893e1..a915d74a 100644 --- a/src/browser/Factory.zig +++ b/src/browser/Factory.zig @@ -303,7 +303,7 @@ pub fn destroy(self: *Factory, value: anytype) void { if (comptime IS_DEBUG) { // We should always destroy from the leaf down. - if (@hasField(S, "_type") and @typeInfo(@TypeOf(value._type)) == .@"union") { + if (@hasDecl(S, "_prototype_root")) { // A Event{._type == .generic} (or any other similar types) // _should_ be destoyed directly. The _type = .generic is a pseudo // child