File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -60,12 +60,18 @@ export class FileManageService {
60
60
if ( hostURLObj . hostname === 'localhost' ) {
61
61
convertedRemoteFile . fileLocalPath = remoteFile . fileLocalPath ;
62
62
}
63
- // replace part
64
- const fileURLObj = new URL ( remoteFile . fileUri ) ;
65
- fileURLObj . host = hostURLObj . host ;
66
- fileURLObj . protocol = hostURLObj . protocol ;
67
- fileURLObj . pathname = FileManageService . trimEndSlash ( hostURLObj . pathname ) + fileURLObj . pathname ;
68
- convertedRemoteFile . fileUri = fileURLObj . toString ( ) ;
63
+ if ( remoteFile . fileUri ) {
64
+ try {
65
+ // replace part
66
+ const fileURLObj = new URL ( remoteFile . fileUri ) ;
67
+ fileURLObj . host = hostURLObj . host ;
68
+ fileURLObj . protocol = hostURLObj . protocol ;
69
+ fileURLObj . pathname = FileManageService . trimEndSlash ( hostURLObj . pathname ) + fileURLObj . pathname ;
70
+ convertedRemoteFile . fileUri = fileURLObj . toString ( ) ;
71
+ } catch ( ex ) {
72
+ logger . warn ( ex ) ;
73
+ }
74
+ }
69
75
} else {
70
76
convertedRemoteFile . fileUri = remoteFile . fileUri ;
71
77
}
You can’t perform that action at this time.
0 commit comments