File tree Expand file tree Collapse file tree 1 file changed +15
-14
lines changed
frontend/app/view/preview Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -529,17 +529,6 @@ function TableBody({
529
529
}
530
530
const normPath = finfo . path ;
531
531
const fileName = finfo . path . split ( "/" ) . pop ( ) ;
532
- let parentFileInfo : FileInfo ;
533
- try {
534
- parentFileInfo = await RpcApi . FileInfoCommand ( TabRpcClient , {
535
- info : {
536
- path : await model . formatRemoteUri ( finfo . dir , globalStore . get ) ,
537
- } ,
538
- } ) ;
539
- } catch ( e ) {
540
- console . log ( "could not get parent file info. using child file info as fallback" ) ;
541
- parentFileInfo = finfo ;
542
- }
543
532
const menu : ContextMenuItem [ ] = [
544
533
{
545
534
label : "New File" ,
@@ -620,9 +609,21 @@ function TableBody({
620
609
} ,
621
610
{
622
611
label : makeNativeLabel ( PLATFORM , true , true ) ,
623
- click : ( ) => {
624
- getApi ( ) . openNativePath ( parentFileInfo . path ) ;
625
- } ,
612
+ click : ( ) =>
613
+ fireAndForget ( async ( ) => {
614
+ let parentFileInfo : FileInfo ;
615
+ try {
616
+ parentFileInfo = await RpcApi . FileInfoCommand ( TabRpcClient , {
617
+ info : {
618
+ path : await model . formatRemoteUri ( finfo . dir , globalStore . get ) ,
619
+ } ,
620
+ } ) ;
621
+ } catch ( e ) {
622
+ console . log ( "could not get parent file info. using child file info as fallback" ) ;
623
+ parentFileInfo = finfo ;
624
+ }
625
+ getApi ( ) . openNativePath ( parentFileInfo . path ) ;
626
+ } ) ,
626
627
}
627
628
) ;
628
629
}
You can’t perform that action at this time.
0 commit comments