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

Commit c38371d

Browse files
committed
Refactor if to make it easier to read
(A || B) == (!A && !B)
1 parent 002891c commit c38371d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/frame_manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ func (m *FrameManager) frameNavigated(frameID cdp.FrameID, parentFrameID cdp.Fra
245245
isMainFrame := parentFrameID == ""
246246
frame := m.frames[frameID]
247247

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

0 commit comments

Comments
 (0)