fix(cdpSession): events without payload (#1553)

This commit is contained in:
Max Schmitt 2024-04-17 18:10:55 +02:00 committed by GitHub
parent 5c17cc49ed
commit 2f264eab76
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,7 +35,10 @@ public class CDPSessionImpl extends ChannelOwner implements CDPSession {
super.handleEvent(event, parameters);
if ("event".equals(event)) {
String method = parameters.get("method").getAsString();
JsonObject params = parameters.get("params").getAsJsonObject();
JsonObject params = null;
if (parameters.has("params")) {
params = parameters.get("params").getAsJsonObject();
}
listeners.notify(method, params);
}
}