Skip to content

Commit b75095c

Browse files
FatmeFatme
authored andcommitted
Fix compilation error
1 parent f83f314 commit b75095c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/iphone-simulator-xcode-simctl.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,11 @@ export class XCodeSimctlSimulator extends IPhoneSimulatorNameGetter implements I
245245
}
246246
}
247247

248-
private verifyDevice(device: IDevice): void {
248+
private verifyDevice(device: IDevice | string): void {
249249
const availableDevices = this.getDevices();
250-
if (!_.find(availableDevices, { id: device.id }) && !_.find(availableDevices, { name: device.id })) {
251-
errors.fail(`No simulator image available for device identifier '${device.id}'.`);
250+
const deviceId = (<IDevice>device).id || device;
251+
if (!_.find(availableDevices, { id: deviceId }) && !_.find(availableDevices, { name: deviceId })) {
252+
errors.fail(`No simulator image available for device identifier '${deviceId}'.`);
252253
}
253254
}
254255

0 commit comments

Comments
 (0)