Skip to content

Commit 7741de7

Browse files
Merge pull request #597 from lightpanda-io/fix_undefined_access
Remove undefined that causes crash
2 parents d4c8e8c + a8c5087 commit 7741de7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/browser/dom/html_collection.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ pub const HTMLCollection = struct {
281281
include_root: bool = false,
282282

283283
// save a state for the collection to improve the _item speed.
284-
cur_idx: ?u32 = undefined,
285-
cur_node: ?*parser.Node = undefined,
284+
cur_idx: ?u32 = null,
285+
cur_node: ?*parser.Node = null,
286286

287287
// start returns the first node to walk on.
288288
fn start(self: *const HTMLCollection) !?*parser.Node {

0 commit comments

Comments
 (0)