Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

Commit

Permalink
Fix cannot find context with specified id
Browse files Browse the repository at this point in the history
Fixes #49

This fixes the problem to some extent and I don't know about the
implications of skipping IFrames with empty URLs. However, it
seems like fixing the problem after plenty of manual tests.
  • Loading branch information
inancgumus committed Dec 2, 2021
1 parent 9bc1396 commit ff9db39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/frame_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ func (fs *FrameSession) onAttachedToTarget(event *target.EventAttachedToTarget)
session := fs.page.browserCtx.conn.getSession(event.SessionID)
targetID := event.TargetInfo.TargetID

if event.TargetInfo.Type == "iframe" {
if eti := event.TargetInfo; eti.Type == "iframe" && eti.URL != "" {
frame := fs.manager.getFrameByID(cdp.FrameID(targetID))
if frame == nil {
return
Expand Down

0 comments on commit ff9db39

Please sign in to comment.