Unverified Commit 631cd4d0 authored by James D. Lin's avatar James D. Lin Committed by GitHub

[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.
parent a849daf2
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment