[flutter_tool] fix NPE in log reader for web server device (#46729)
This commit is contained in:
@@ -218,7 +218,7 @@ class WebServerDevice extends Device {
|
||||
|
||||
@override
|
||||
DeviceLogReader getLogReader({ApplicationPackage app}) {
|
||||
return _logReader ??= NoOpDeviceLogReader(app.name);
|
||||
return _logReader ??= NoOpDeviceLogReader(app?.name);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -58,6 +58,7 @@ void main() {
|
||||
expect(device.supportsScreenshot, false);
|
||||
expect(await device.isLocalEmulator, false);
|
||||
expect(device.getLogReader(app: mockWebApplicationPackage), isInstanceOf<NoOpDeviceLogReader>());
|
||||
expect(device.getLogReader(), isInstanceOf<NoOpDeviceLogReader>());
|
||||
expect(await device.portForwarder.forward(1), 1);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user