Skip to content

Commit 64ae5cf

Browse files
committed
fix: don't show "TypeError: Invalid Version: null" error in sidekick when emulator is stoped immediately after start
1 parent 16d9674 commit 64ae5cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/common/mobile/android/logcat-helper.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class LogcatHelper implements Mobile.ILogcatHelper {
6161
private async getLogcatStream(deviceIdentifier: string, pid?: string) {
6262
const device = await this.$devicesService.getDevice(deviceIdentifier);
6363
const minAndroidWithLogcatPidSupport = "7.0.0";
64-
const isLogcatPidSupported = semver.gte(semver.coerce(device.deviceInfo.version), minAndroidWithLogcatPidSupport);
64+
const isLogcatPidSupported = !!device.deviceInfo.version && semver.gte(semver.coerce(device.deviceInfo.version), minAndroidWithLogcatPidSupport);
6565
const adb: Mobile.IDeviceAndroidDebugBridge = this.$injector.resolve(DeviceAndroidDebugBridge, { identifier: deviceIdentifier });
6666
const logcatCommand = ["logcat"];
6767

0 commit comments

Comments
 (0)