Skip to content

Commit

Permalink
fix(cdpSession): allow optional params in events
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Apr 17, 2024
1 parent d12ce3b commit 2ac36e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion playwright/_impl/_cdp_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(
self._channel.on("event", lambda params: self._on_event(params))

def _on_event(self, params: Any) -> None:
self.emit(params["method"], params["params"])
self.emit(params["method"], params.get("params"))

async def send(self, method: str, params: Dict = None) -> Dict:
return await self._channel.send("send", locals_to_params(locals()))
Expand Down

0 comments on commit 2ac36e4

Please sign in to comment.