Skip to content

Commit

Permalink
Refactor if to make it easier to read
Browse files Browse the repository at this point in the history
(A || B) == (!A && !B)
  • Loading branch information
ankur22 committed Nov 15, 2024
1 parent 77a5872 commit 93ba678
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/frame_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func (m *FrameManager) frameNavigated(frameID cdp.FrameID, parentFrameID cdp.Fra
isMainFrame := parentFrameID == ""
frame := m.frames[frameID]

if !(isMainFrame || frame != nil) {
if !isMainFrame && frame == nil {
return errors.New("we either navigate top level or have old version of the navigated frame")
}

Expand Down

0 comments on commit 93ba678

Please sign in to comment.