File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 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 {
469469 }
470470
471471 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+ }
475478 }
476479
477480 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 ) ) {
479482 return true ;
480483 }
481484
482- return this . $options . emulator ? this . $ devicesService. isiOSSimulator ( device ) : this . $devicesService . isiOSDevice ( device ) ;
485+ return this . $devicesService . isiOSDevice ( currentDevice ) ;
483486 }
484487
485488 return true ;
You can’t perform that action at this time.
0 commit comments