bug: document.Refresh() panics if page.Reload() returns nil response #11
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #1
Description
In
document.go:58-69:If Playwright's
Reload()returns(nil, nil)— which can happen if the page is already navigating or in some edge cases —resp.Status()will cause a nil pointer dereference.Fix
Add a nil check:
if resp == nil { return nil }or treat nil response as an error.Starting work on this as part of PR 2 (also includes #10). Will add nil check for
respfromReload()indocument.go:Refresh().Work finished. PR: #33
Added nil check for
respfromReload()indocument.go:Refresh().Resolved by PR #33 — added nil guard for
respbefore callingresp.Status()indocument.Refresh().