forked from firka/flutter
[flutter tools] Fix an assert in IOSSimulator.getLogReader (#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.
This commit is contained in:
@@ -525,7 +525,7 @@ class IOSSimulator extends Device {
|
||||
covariant IOSApp app,
|
||||
bool includePastLogs = false,
|
||||
}) {
|
||||
assert(app is IOSApp);
|
||||
assert(app == null || app is IOSApp);
|
||||
assert(!includePastLogs, 'Past log reading not supported on iOS simulators.');
|
||||
_logReaders ??= <ApplicationPackage, _IOSSimulatorLogReader>{};
|
||||
return _logReaders.putIfAbsent(app, () => _IOSSimulatorLogReader(this, app));
|
||||
|
||||
Reference in New Issue
Block a user