diff --git a/src/browser/webapi/Node.zig b/src/browser/webapi/Node.zig index 2cb0d323..ef6de4a7 100644 --- a/src/browser/webapi/Node.zig +++ b/src/browser/webapi/Node.zig @@ -175,12 +175,8 @@ pub fn getTextContent(self: *Node, writer: *std.Io.Writer) error{WriteFailed}!vo var it = self.childrenIterator(); while (it.next()) |child| { // ignore comments and TODO processing instructions. - switch (child._type) { - .cdata => |c| switch (c._type) { - .comment => continue, - .text => {}, - }, - else => {}, + if (child.is(CData.Comment) != null) { + continue; } try child.getTextContent(writer); }