[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:
James D. Lin
2020-05-07 21:10:55 -07:00
committed by GitHub
parent a849daf283
commit 631cd4d0be

View File

@@ -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));