diff --git a/src/cdp/domains/dom.zig b/src/cdp/domains/dom.zig index fdb5dd13..035918e8 100644 --- a/src/cdp/domains/dom.zig +++ b/src/cdp/domains/dom.zig @@ -277,15 +277,12 @@ fn resolveNode(cmd: anytype) !void { var js_context = page.main_context; if (params.executionContextId) |context_id| { if (js_context.v8_context.debugContextId() != context_id) { - var found = false; for (bc.isolated_worlds.items) |*isolated_world| { js_context = &(isolated_world.executor.js_context orelse return error.ContextNotFound); if (js_context.v8_context.debugContextId() == context_id) { - found = true; break; } - } - if (!found) return error.ContextNotFound; + } else return error.ContextNotFound; } }