We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2438a0e commit a59c327Copy full SHA for a59c327
src/browser/dom/element.zig
@@ -249,8 +249,13 @@ pub const Element = struct {
249
// We always get it wrapped like so:
250
// <html><head></head><body>{ ... }</body></html>
251
// None of the following can be null.
252
- const html = parser.nodeFirstChild(fragment_node).?;
253
- const body = parser.nodeLastChild(html).?;
+ const maybe_html = parser.nodeFirstChild(fragment_node);
+ std.debug.assert(maybe_html != null);
254
+ const html = maybe_html.?;
255
+
256
+ const maybe_body = parser.nodeLastChild(html);
257
+ std.debug.assert(maybe_body != null);
258
+ const body = maybe_body.?;
259
260
const children = try parser.nodeGetChildNodes(body);
261
0 commit comments