File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,9 @@ export default function buildRequestHandlers(client: LanguageClient) {
44
44
const instance = getInstance ( ) ;
45
45
if ( instance && instance . getConnection ( ) ) {
46
46
const config = instance . getConfig ( ) ;
47
- return config . homeDirectory ;
47
+ if ( config ) {
48
+ return config . homeDirectory ;
49
+ }
48
50
}
49
51
} )
50
52
@@ -103,13 +105,15 @@ export default function buildRequestHandlers(client: LanguageClient) {
103
105
const content = instance ?. getContent ( ) ;
104
106
const config = instance ?. getConfig ( ) ! ;
105
107
106
- if ( includePaths . length === 0 ) {
107
- includePaths . push ( config . homeDirectory ) ;
108
- }
108
+ if ( instance && content && config ) {
109
+ if ( includePaths . length === 0 ) {
110
+ includePaths . push ( config . homeDirectory ) ;
111
+ }
109
112
110
- const resolvedPath = await content ?. streamfileResolve ( bases , includePaths ) ;
113
+ const resolvedPath = await content ?. streamfileResolve ( bases , includePaths ) ;
111
114
112
- return resolvedPath ;
115
+ return resolvedPath ;
116
+ }
113
117
} ) ;
114
118
115
119
/**
You can’t perform that action at this time.
0 commit comments