File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
src/components/intercept/config Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ function getReadablePath(path: string) {
123123
124124declare global {
125125 interface Window {
126- nativeFile ?: { open : ( ) => Promise < string | undefined > } ;
126+ desktopApi ?: { selectApplication : ( ) => Promise < string | undefined > } ;
127127 }
128128}
129129
@@ -149,11 +149,13 @@ class ElectronConfig extends React.Component<{
149149
150150 selectApplication = async ( ) => {
151151 const useNativePicker =
152- platform == 'mac' && window . nativeFile ?. open ;
152+ platform == 'mac' && window . desktopApi ?. selectApplication ;
153153
154- const pathToApplication = await ( useNativePicker
155- ? window . nativeFile ?. open ( )
156- : uploadFile ( 'path' ) ) ;
154+ const pathToApplication = await (
155+ useNativePicker
156+ ? window . desktopApi ?. selectApplication ( )
157+ : uploadFile ( 'path' )
158+ ) ;
157159
158160 if ( ! pathToApplication ) {
159161 this . props . closeSelf ( ) ;
You can’t perform that action at this time.
0 commit comments