File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,8 @@ const isCordova = (win: any): boolean => !!(win['cordova'] || win['phonegap'] ||
99
99
100
100
const isCapacitorNative = ( win : any ) : boolean => {
101
101
const capacitor = win [ 'Capacitor' ] ;
102
- return ! ! capacitor ?. isNative ;
102
+ // TODO(ROU-11693): Remove when we no longer support Capacitor 2, which does not have isNativePlatform
103
+ return ! ! ( capacitor ?. isNative || ( capacitor ?. isNativePlatform && ! ! capacitor . isNativePlatform ( ) ) ) ;
103
104
} ;
104
105
105
106
const isElectron = ( win : Window ) : boolean => testUserAgent ( win , / e l e c t r o n / i) ;
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export const PlatformConfiguration = {
29
29
} ,
30
30
Capacitor : {
31
31
Capacitor : {
32
- isNative : true ,
32
+ isNativePlatform : ( ) => true ,
33
33
} ,
34
34
} ,
35
35
PWA : {
You can’t perform that action at this time.
0 commit comments