File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -469,17 +469,20 @@ export class PlatformService implements IPlatformService {
469
469
}
470
470
471
471
private getCanExecuteAction ( platform : string ) : any {
472
- let canExecute = ( device : Mobile . IDevice ) : boolean => {
473
- if ( this . $options . device ) {
474
- return device . deviceInfo . identifier === this . $devicesService . getDeviceByDeviceOption ( ) . deviceInfo . identifier ;
472
+ let canExecute = ( currentDevice : Mobile . IDevice ) : boolean => {
473
+ if ( this . $options . device && currentDevice && currentDevice . deviceInfo ) {
474
+ let device = this . $devicesService . getDeviceByDeviceOption ( ) ;
475
+ if ( device && device . deviceInfo ) {
476
+ return currentDevice . deviceInfo . identifier === device . deviceInfo . identifier ;
477
+ }
475
478
}
476
479
477
480
if ( this . $mobileHelper . isiOSPlatform ( platform ) && this . $hostInfo . isDarwin ) {
478
- if ( this . $devicesService . isOnlyiOSSimultorRunning ( ) ) {
481
+ if ( this . $devicesService . isOnlyiOSSimultorRunning ( ) || this . $options . emulator || this . $devicesService . isiOSSimulator ( currentDevice ) ) {
479
482
return true ;
480
483
}
481
484
482
- return this . $options . emulator ? this . $ devicesService. isiOSSimulator ( device ) : this . $devicesService . isiOSDevice ( device ) ;
485
+ return this . $devicesService . isiOSDevice ( currentDevice ) ;
483
486
}
484
487
485
488
return true ;
You can’t perform that action at this time.
0 commit comments