Skip to content

Commit 2e4e81b

Browse files
authored
fix(cdpSession): allow optional params in events (#2411)
1 parent ad9087a commit 2e4e81b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

playwright/_impl/_cdp_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def __init__(
2626
self._channel.on("event", lambda params: self._on_event(params))
2727

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

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

0 commit comments

Comments
 (0)