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:
Bob Potter 2018-12-07 17:57:14 -06:00 committed by Daniel Martí
parent 7f54f3f93c
commit 85ecf4f31f

View File

@ -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)