Skip to content

Commit 0caf154

Browse files
committed
fix: fix the "cannot read property imageIdentifier of undefined" error
1 parent e39bbc4 commit 0caf154

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/common/mobile/android/android-emulator-services.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ export class AndroidEmulatorServices implements Mobile.IEmulatorPlatformService
9797

9898
while (hasTimeLeft || isInfiniteWait) {
9999
const emulators = (await this.getEmulatorImages()).devices;
100-
emulator = _.find(emulators, e => e.imageIdentifier === emulator.imageIdentifier);
101-
if (emulator && this.$emulatorHelper.isEmulatorRunning(emulator)) {
100+
const newEmulator = _.find(emulators, e => e.imageIdentifier === emulator.imageIdentifier);
101+
if (newEmulator && this.$emulatorHelper.isEmulatorRunning(newEmulator)) {
102102
return {
103-
runningEmulator: emulator,
103+
runningEmulator: newEmulator,
104104
errors: [],
105105
endTimeEpoch
106106
};

0 commit comments

Comments
 (0)