Skip to content

Commit 631cd4d

Browse files
authored
[flutter tools] Fix an assert in IOSSimulator.getLogReader (flutter#56630)
`assert(app is IOSApp)` fails if `app` is null, and `app` is an optional argument. `app` is passed to `_IOSSimulatorLogReader`, which already handles it being null.
1 parent a849daf commit 631cd4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/flutter_tools/lib/src/ios/simulators.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ class IOSSimulator extends Device {
525525
covariant IOSApp app,
526526
bool includePastLogs = false,
527527
}) {
528-
assert(app is IOSApp);
528+
assert(app == null || app is IOSApp);
529529
assert(!includePastLogs, 'Past log reading not supported on iOS simulators.');
530530
_logReaders ??= <ApplicationPackage, _IOSSimulatorLogReader>{};
531531
return _logReaders.putIfAbsent(app, () => _IOSSimulatorLogReader(this, app));

0 commit comments

Comments
 (0)