Skip to content

Commit

Permalink
return ErrInvalidDimensions when the slice of content quads is empty
Browse files Browse the repository at this point in the history
Fixes #697.
  • Loading branch information
ZekeLu committed Aug 17, 2021
1 parent 980ee45 commit 298087b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions input.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ func MouseClickNode(n *cdp.Node, opts ...MouseOption) MouseAction {
if err != nil {
return err
}

if len(boxes) == 0 {
return ErrInvalidDimensions
}

content := boxes[0]

c := len(content)
Expand Down

0 comments on commit 298087b

Please sign in to comment.