chromedp: fix SetHandlerByID
Don't fall through and return an error if we found a handler with a matching ID.
This commit is contained in:
parent
7f54f3f93c
commit
85ecf4f31f
|
@ -239,6 +239,7 @@ func (c *CDP) SetHandlerByID(id string) error {
|
||||||
|
|
||||||
if i, ok := c.handlerMap[id]; ok {
|
if i, ok := c.handlerMap[id]; ok {
|
||||||
c.cur = c.handlers[i]
|
c.cur = c.handlers[i]
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return fmt.Errorf("no handler associated with target id %s", id)
|
return fmt.Errorf("no handler associated with target id %s", id)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user