Skip to content

Commit 77e5b37

Browse files
authored
Handle potential null value in setUpChromeConsoleListeners (#2162)
1 parent 5081dff commit 77e5b37

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

dwds/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 19.0.2-wip
22

3+
- Fix Flutter crash due to potential null value in `setUpChromeConsoleListener`. - [#2162](https://github.com/dart-lang/webdev/pull/2162)
4+
35
## 19.0.1
46

57
- Do not show async frame errors on evaluation. - [#2073](https://github.com/dart-lang/webdev/pull/2073)

dwds/lib/src/services/chrome_proxy_service.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,8 @@ ${globalLoadStrategy.loadModuleSnippet}("dart_sdk").developer.invokeExtension(
13611361
final isolate = inspector.isolate;
13621362
if (isolateRef.id != isolate.id) return;
13631363

1364-
final firstArgValue = event.args[0].value as String;
1364+
final args = event.args;
1365+
final firstArgValue = (args.isNotEmpty ? args[0].value : null) as String?;
13651366
// TODO(nshahan) - Migrate 'inspect' and 'log' events to the injected
13661367
// client communication approach as well?
13671368
switch (firstArgValue) {

0 commit comments

Comments
 (0)